Volume 7 · Chapter 12 — Microservices and System Design

Volume Summary and Interview Rapid-Fire

Goutham Mayaluri 4 min read AWSCloudMicroservicesSystem Design

12.1 What This Volume Covered

This volume assembled the earlier building blocks into system design: the monolith-versus-microservices trade-off, synchronous versus asynchronous communication and the API gateway, decomposing by business domain and bounded contexts, data and consistency across services (eventual consistency, sagas, outbox, idempotency), resilience patterns (timeouts, retries, circuit breakers, bulkheads, graceful degradation), scalability (statelessness, horizontal scaling, caching, async processing), and a method for system design interviews. The unifying themes are choosing deliberately based on trade-offs rather than dogma, designing for failure and eventual consistency in distributed systems, and reasoning structurally from requirements. The rest of this chapter consolidates the essentials.

12.2 Rapid-Fire Interview Questions

Rapid-Fire

The core trade-off of microservices?

They buy independence - independent deploy, independent scaling, team autonomy, fault isolation - at the cost of distributed-systems complexity: network failures, eventual consistency, harder debugging, and operational overhead. Worth it when independence genuinely matters; otherwise a monolith is simpler.

Rapid-Fire

Synchronous vs asynchronous communication?

Synchronous (request/response) is simple and gives an immediate result but couples caller to downstream availability. Asynchronous (queue/event) decouples, absorbs bursts, and fans out but brings eventual consistency and needs idempotent consumers. Choose per interaction.

Rapid-Fire

How should you decompose into services?

By business capability and bounded context, not technical layer. High cohesion within, loose coupling between, and each service owns its own data (never a shared database). Right-size so most work stays within one service.

Rapid-Fire

Why can't you use one transaction across services, and what do you do instead?

Each service owns its own database, so there’s no single ACID transaction across them. Use ACID within a service, accept eventual consistency across services, and coordinate multi-step operations with a saga (local transactions + compensating actions).

Rapid-Fire

What is the saga pattern?

A multi-step cross-service operation done as a sequence of local transactions, each in one service, with compensating actions to undo earlier steps if a later one fails - giving consistency without a distributed transaction.

Rapid-Fire

What does a circuit breaker do?

On detecting a high failure rate to a dependency, it opens and stops calling it (failing fast or returning a fallback), which protects your service and gives the failing dependency room to recover - preventing cascading failure. It retries a trial call after a cooldown.

Rapid-Fire

Why do retries need backoff and jitter?

Naive immediate retries from many clients hammer a struggling dependency (a retry storm) and worsen the outage. Exponential backoff waits progressively longer, jitter desynchronizes clients, and limits plus idempotency prevent amplification and duplicate effects.

Rapid-Fire

Why is statelessness key to scaling?

Stateless services hold no local client state, so any instance handles any request and you scale out by adding instances behind a load balancer. It’s what makes horizontal scaling (and resilience) work; state must live in shared external stores.

Rapid-Fire

What's usually the scaling bottleneck, and how do you address it?

The data tier. Address it with caching and read replicas for reads, asynchronous processing to offload writes, horizontally-scalable stores like DynamoDB where needed, and sharding for very large relational data. Scaling stateless compute is the easy part.

Rapid-Fire

How do you approach a system design interview?

Clarify requirements and scope (functional + non-functional) first, estimate scale and define the data, design high-level then deep-dive, and address scaling, resilience, security, and trade-offs throughout. Naming trade-offs shows judgment; the method matters more than a “perfect” answer.

12.3 Closing

System design is where all the earlier pieces - compute, data, networking, security, observability - combine into architectures, and the recurring lesson is judgment: choose based on trade-offs, design for failure and eventual consistency, keep services cohesive and independent, scale statelessly, and reason from requirements. These principles carry directly into the next volume, which focuses on keeping systems available and recoverable under failure: high availability, disaster recovery, and safe change.