10 parts · 12 chapters
Backend Architecture and Scale
The backend mirror of the Frontend Architecture course: how to shape a backend so that many teams can change it safely for years. Architecture is mostly about boundaries: which code may call which, which service owns which data, and which failures stay contained.
Ten parts: choosing between a monolith, a modular monolith and services honestly; hexagonal and clean architecture in real TypeScript; DDD tactical patterns; data ownership and service boundaries; event-driven architecture, choreography and orchestration; synchronous versus asynchronous integration; multi-tenancy designs; and three incident logs written the way post-mortems are: the distributed monolith, the shared database and the event storm.
shapeMonolith, modular monolith or services, chosen by team and change pattern.
insidePorts and adapters, aggregates, repositories, domain events.
boundariesOne owner per piece of data; contracts between owners.
integrationCalls versus events; choreography versus orchestration.
tenantsPooled, bridged and siloed tenancy, and noisy neighbours.
failureThree incidents that come from architecture, not code.
00
Monolith, Modular Monolith, Services: Choosing Honestly
Shapes and their costs · Extracting a service: the strangler fig
2 ch · ~12 min01Hexagonal and Clean Architecture in Real Code
A use case with ports
1 ch · ~8 min02DDD Tactical Patterns
Entities, value objects, aggregates · Bounded contexts and translation
2 ch · ~12 min03Data Ownership and Service Boundaries
Owners, queries and read models
1 ch · ~8 min04Event-Driven Architecture: Choreography and Orchestration
Events, commands and state
1 ch · ~8 min05Synchronous versus Asynchronous Integration
Sync chains multiply failure
1 ch · ~8 min06Multi-Tenancy Designs
Isolation enforced in the database
1 ch · ~8 min07Incident Log: The Distributed Monolith
Timeline and lessons
1 ch · ~8 min08Incident Log: The Shared Database
Timeline and lessons
1 ch · ~8 min09Incident Log: The Event Storm
Timeline and lessons
1 ch · ~8 minBuilt on System Design and Distributed SystemsUses Backend System Design for components, Distributed Systems for failure, and Ledgers for the running payments example.