Skip to content
System Design Lab

47 topics

Microservice Patterns

Proven solutions for communication, data consistency, resilience and messaging between services — each one simulated so you can see why it exists.

Reliability & resilience

Intermediate 8 min read

Circuit Breaker

Stop calling a dependency that is failing, fail fast instead, and probe carefully until it recovers — so one broken service cannot drag down everything that calls it.

Patterns
Beginner 7 min read

Retry

Transparently repeat a failed call when the failure is likely temporary — with backoff, jitter and a strict limit, so retries heal glitches instead of amplifying outages.

Patterns
Beginner 5 min read

Timeout

Put an upper bound on how long you wait for any remote call, so one hanging dependency cannot quietly hold every thread, connection and user request hostage.

Patterns
Intermediate 4 min read

Bulkhead

Split resources into isolated compartments so one slow or failing dependency can exhaust only its own share — and everything else keeps working.

Patterns
Intermediate 4 min read

Rate Limiting

Cap how many requests a client may make per unit of time to protect services from bursts and abuse — and pick the algorithm whose behaviour at the edges you can live with.

Patterns
Beginner 4 min read

Fallback

When a dependency fails, answer with something useful instead of an error — a default, a cached value or a reduced feature — so a non-essential failure never breaks an essential page.

Patterns
Intermediate 4 min read

Backpressure

When a consumer cannot keep up, push the problem back to the producer — bounded queues and 429 Retry-After — instead of buffering in memory until the process dies and takes accepted work with it.

Patterns
Advanced 4 min read

Leader Election

When work must be done by exactly one of many identical instances — a scheduled job, a coordinator, a single writer — let them elect a leader with an expiring lease, and fence out a leader that comes back from the dead.

Patterns
Advanced 4 min read

Scheduler Agent Supervisor

Run a multi-step distributed workflow with three roles: a scheduler that drives the steps, agents that do the remote work, and a supervisor that finds steps that stalled or failed and retries or compensates them.

Patterns

Communication

Data management

Messaging

Intermediate 6 min read

Idempotent Consumer

Make processing a message twice have the same effect as processing it once, because every practical message broker will, sooner or later, deliver the same message more than once.

Patterns
Beginner 5 min read

Dead Letter Queue

Park messages that keep failing in a separate queue after a few attempts, so one poison message cannot block or burn a consumer forever — then fix the cause and redrive them.

Patterns
Beginner 4 min read

Competing Consumers

Let several identical workers pull from the same queue so throughput scales with the number of workers — and understand what you give up: ordering, and exactly-once processing.

Patterns
Beginner 4 min read

Queue-Based Load Leveling

Put a queue between a bursty producer and a system that cannot scale, so the system works at a steady pace it can sustain while the queue absorbs the peaks.

Patterns
Beginner 3 min read

Priority Queue

Let urgent work overtake routine work in a queue — with priority lanes or separate queues and consumers — so a batch flood never makes interactive users wait, without starving the batch forever.

Patterns
Beginner 4 min read

Claim Check

Keep large payloads out of the message bus: store them in blob storage and send only a small token that points to them, so the broker stays fast, cheap and within its size limits.

Patterns
Beginner 4 min read

Pipes and Filters

Break a multi-step processing job into independent filters connected by queues (pipes), so each step can be scaled, deployed and diagnosed on its own — and a slow step is visible as a growing queue in front of it.

Patterns

Observability & operations

Architecture

Intermediate 4 min read

Event-Driven Architecture

Build systems where services announce facts as events and others react. Learn the difference between event notification and event-carried state transfer, and what each costs.

Patterns
Beginner 4 min read

Backend for Frontend (BFF)

Give each client experience — web, mobile, partners — its own thin backend that shapes data for that screen, so clients make one call instead of many over slow networks.

Patterns
Intermediate 4 min read

Strangler Fig

Replace a monolith piece by piece: put a routing facade in front of it, move one capability at a time to a new service, shift traffic gradually — and keep rollback one switch away.

Patterns
Intermediate 4 min read

Microservices Architecture

Build a system as small services that are deployed, scaled and owned independently — and pay for it with network calls, partial failures and operational overhead.

Patterns
Intermediate 4 min read

Modular Monolith

One deployable with strong internal module boundaries: the simplicity and speed of a monolith, structured so modules can be extracted into services later — when a real need appears.

Patterns
Advanced 4 min read

Service Decomposition

Where to draw service boundaries: by business capability, not by technical layer — and not so fine that every request becomes a fan-out of synchronous calls, a distributed monolith.

Patterns
Intermediate 4 min read

Sidecar and Ambassador

Run cross-cutting networking — retries, timeouts, circuit breaking, TLS, metrics — in a helper process next to the application, so every service gets it without changing its code. A fleet of sidecars is a service mesh.

Patterns
Intermediate 4 min read

Anti-Corruption Layer

Put a translating façade between a new system and a legacy one, so the legacy model, protocols and quirks stay on the other side — and so you can cache, batch and protect the legacy system on the way.

Patterns
Intermediate 4 min read

UI Composition

Build pages from fragments owned by different teams — assembled on the server or in the browser — and give optional fragments their own deadlines, so one slow team cannot make the whole page slow.

Patterns

Security

Testing & delivery