Monorepo or many repositories

Back to list2025-11-14
You

Is a monorepo worth it for four services?

ChatGPT

At four services the deciding factor is how often changes cross a boundary:

MonorepoMulti-repo
Cross-cutting changeone PRcoordinated PRs
CI complexityneeds filteringsimple per repo
Access controlcoarseper repo

If most changes touch one service, separate repos stay simpler. If a typical feature touches three, the coordination cost outweighs everything else.

Tool steps: 3 (reasoning summary, call to python, execution output)
reasoning summary
Checked the query plan, then compared index options.
call to python
rows = run_sql("EXPLAIN (ANALYZE) SELECT ...")
print(rows[:3])
execution output
Seq Scan on events  (cost=0.00..812431.00 rows=41203122 width=16)
  Rows Removed by Filter: 38996878
Planning Time: 0.214 ms
Execution Time: 11842.663 ms
You
budget-2025.png
You

Which protocol for service to service calls?

ChatGPT

gRPC when the callers are yours and latency matters, REST when they are not:

REST/JSONgRPC
Debuggable with curlyesawkward
Schema enforcedoptionalalways
Streamingclumsynative
Browser supportdirectneeds a proxy

The schema is the real difference: with JSON the contract lives in documentation, with protobuf it lives in a file that breaks the build when violated.