You
Is a monorepo worth it for four services?
ChatGPT
At four services the deciding factor is how often changes cross a boundary:
| Monorepo | Multi-repo | |
|---|---|---|
| Cross-cutting change | one PR | coordinated PRs |
| CI complexity | needs filtering | simple per repo |
| Access control | coarse | per 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 msYou
Which protocol for service to service calls?
ChatGPT
gRPC when the callers are yours and latency matters, REST when they are not:
| REST/JSON | gRPC | |
|---|---|---|
| Debuggable with curl | yes | awkward |
| Schema enforced | optional | always |
| Streaming | clumsy | native |
| Browser support | direct | needs 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.
