All articles
In-depth articles on backend, data, system architecture and software development.
All articles
In-depth articles on backend, data, system architecture and software development.
Collection
Eight decisions from building a platform of thirteen NestJS services — from the monorepo and the wire protocols to data ownership, reliable events, safe retries, sessions and deployment.
8 parts · in reading order
One commit can change a gRPC contract and every caller, but the deploys still land one at a time. Here is how thirteen NestJS services share one Nx workspace and still boot, ship and evolve alone.
The gateway gave up after a minute; the gRPC call underneath had no deadline and kept working for a client that was gone. Three ordered questions pick REST, gRPC or Kafka, and each transport's failure mode tells you what to guard.
Thirteen services share one Postgres cluster, yet none can read another's tables. What that isolation buys, what a shared cluster quietly takes back, and how a saga with planned compensations replaces the JOIN.
The outbox table is the easy part. Lost and duplicated events come from the relay and the consumer: who claims a row, what happens when a sender stalls, and how an inbox spots the same event twice.
A URL ending in /orders/1042 tells strangers more than you meant. Why every addressable row gets a bigint for joins and a UUIDv7 for the outside, and what that second id really costs.
A timed-out request may have succeeded, failed or never arrived. How a receipt that commits with the order, plus If-Match versions, makes every retry safe, and why you need both.
A copied refresh token works exactly like the real one, so the server can't tell user from thief. How rotation and reuse detection make the second holder trip an alarm, from real code, plus the gaps it still leaves.
One docker compose up can start thirteen NestJS services on a single EC2 host, but it can't redeploy without dropping requests or survive losing that host. Where that line sits, and the signals that say it's time for ECS or Kubernetes.
You have seen all 8 articles.