Skip to slide
Chapter 16 · Scaling and Infrastructure
162 / 191

CHAPTER 16 · Scaling and Infrastructure · 8 / 10

Don't over-build early

A caution: it's easy to design a microservice-and-queue cathedral before you have users. The pragmatic path:

  • Start as a single well-structured service with a relational DB and object storage. This scales remarkably far with stateless instances behind a load balancer.
  • Keep the seams ready: status fields for future async, a provider abstraction, stateless servers, so you can extract workers and add caches when the load justifies it.
  • Let observability drive infra decisions. Add the queue when synchronous processing actually hurts; add the cache when a call is actually hot; add replicas when reads actually saturate. Build for the scale you have plus a bit, not the scale you fantasize about.
← → arrow keys work too