Volume 9 · Chapter 11 — Enterprise Application Architecture & System Design
Volume 9 Summary and Interview Rapid-Fire
What This Volume Covered
- Enterprise architecture fundamentals and quality attributes
- Clean Architecture and Domain-Driven Design at the system level
- Microservices decomposition and the distributed monolith trap
- Event-driven architecture: commands, events, and coordination
- CQRS and Event Sourcing applied deliberately
- Messaging and integration patterns
- Distributed system design: CAP, consistency, and fault tolerance
- Scalability and performance architecture
- Security architecture: OAuth2, OIDC, JWT, Zero Trust
- The principal architect’s system-design method
How the Pieces Fit Together
This volume is a single argument about designing large systems: quality attributes drive the architecture; bounded contexts tell you where to draw boundaries; those boundaries become modules or services; events and messaging integrate them with loose coupling; CAP and consistency models decide where you keep strong guarantees and where you accept eventual consistency; scalability and resilience patterns keep the system fast and alive under load and failure; security is layered through every tier; and the design method ties it together with disciplined, trade-off-aware reasoning. The recurring theme ismake deliberate trade-offs against explicit requirementsrather than reaching for sophistication by default.
What drives an architecture - functional or non-functional requirements?
Non-functional (quality attributes) - scale, availability, consistency, security - because many designs satisfy the features but only some meet the quality bar.
Bounded context in one line?
A boundary of consistent model and language aligned to a business capability - the seam for service decomposition and team ownership.
Command vs event?
A command is an imperative request to one handler (rejectable); an event is a past-tense fact broadcast to many (a fact, not rejectable).
CAP in one sentence?
Under a network partition you can guarantee consistency or availability, not both - choose per data set.
Why must instances be stateless to scale horizontally?
So any instance can serve any request, enabling load distribution, autoscaling, rolling deploys, and failover without losing state.
Distributed monolith?
Microservices with monolith coupling - shared DB, lockstep deploys, sync chains - all the cost of distribution, none of the independence.
OAuth2 vs OIDC?
OAuth2 = delegated authorization (access token to do things); OIDC adds authentication (ID token saying who you are).
Why keep JWT access tokens short-lived?
They are validated statelessly and hard to revoke before expiry, so a short lifetime limits the damage of a compromised token; pair with revocable refresh tokens.
Saga pattern?
A sequence of local transactions with compensating actions replacing a distributed ACID transaction across services.
First step in any system design?
Clarify requirements and quality attributes and estimate scale before drawing anything.