Yash DabhadeAI Engineer

← Bookshelf

Building Microservices

Read

Takeaways

Microservices are about independent deployability, not small codebases. The book is at its best when it tells you not to use microservices yet.

The Core Ideas

  • Model services around business capabilities (bounded contexts), not technical layers.
  • Information hiding: a service owns its data. A shared database is a distributed monolith waiting to happen.
  • Independent deployability is the goal. If you have to release five services together, you have not gained anything.
  • Start with a monolith when the domain is unclear. Split along seams once you understand them.

Migrating: Strangler Fig

  1. monolith
  2. put a proxy in front
  3. route one capability to a new service
  4. repeat
  5. monolith shrinks away
Incremental and reversible — you never have a big-bang cutover.

Distributed Transactions

Sagas instead of two-phase commit: a sequence of local transactions with compensating actions if a later step fails. Changed how I think about multi-step agent workflows too — every tool call is a step you might need to undo.