11 system design patterns to know in 2026
Load balancers, CDNs, message queues, CQRS: when should you use these eleven architecture patterns, and what constraints should you plan for?
Start with the application’s symptom
An API slows down during a sales campaign. Should you add a server, cache responses or move processing into a queue? These choices address different constraints. I propose examining eleven system design patterns by connecting each to a concrete situation and the cost it adds.
The selection covers networking, but also storage and the organisation of processing. CQRS and sharding therefore go beyond request routing alone. The examples describe fictional situations.
1. Load balancer: distribute requests
A load balancer distributes traffic across multiple instances of a service. It may alternate requests between servers or account for current connections. For a web application whose server is overloaded, it lets you use several instances, provided they can handle the same requests.
High availability also requires detecting failed instances and planning for failure of the balancer itself. Sessions stored only in one instance’s memory complicate failover. Adding application servers also does not fix an already overloaded database. I would therefore start by identifying where requests are actually waiting.
2. CDN: bring content closer to users
A Content Delivery Network serves copies of content from geographically distributed points of presence. An image or JavaScript file already in cache can be delivered without contacting the origin server. This is useful for a catalogue accessed from several regions or for media delivery. The chosen point depends on routing and availability, not just distance on a map.
You need to define what can be shared and for how long. Static files whose names contain a hash can remain cached for a long time. A personalised response requires an appropriate policy: no-store prohibits storage, while private prohibits storage in a shared cache. A cache miss must still be fetched from the origin.
3. Message queue: defer work
A message queue separates receiving a request from processing it. For a large export, the API can record a job to perform, then a consumer produces the file. The queue absorbs a temporary spike if consumers can subsequently catch up. An arrival rate that persistently exceeds their capacity makes the wait grow.
Reliability depends on durability configuration and publisher confirms, followed by acknowledgements after processing. Delivery can repeat: the consumer must avoid creating the same invoice twice, for example by recognising an already processed identifier. You must also decide what happens to messages that keep failing.
RabbitMQ offers work queues, among other features. Kafka is based on partitioned event logs retained according to a retention policy; consumers track their read position. It can distribute work within a group, but replay and independent groups give it different uses from a queue whose messages are consumed and acknowledged.
4. Rate limiter: set a request budget
A limiter controls the allowed request rate for a user, API key or another identity. For example, you can set a per-minute quota on an expensive route, with tolerance for small bursts. This rule helps share resources and contain certain abuses. An HTTP 429 response indicates a limit has been exceeded; Retry-After can specify the delay before trying again.
The choice of key matters: a limit per IP address may penalise several people behind the same network connection. With multiple instances, a local counter on each server can multiply the effective quota. Decide how to coordinate limits and how to behave if counter storage becomes unavailable.
5. Circuit breaker: stop calls that are likely to fail
When a dependency accumulates errors, a circuit breaker opens the circuit: subsequent calls fail quickly for a defined period. A probing phase then lets a few requests through to assess recovery. This mechanism limits resources tied up by a failing external API and helps contain cascading failures.
The calling service must plan what users see during the interruption. A delivery estimate may become temporarily unavailable; an uncertain payment must retain an explicit state. Timeouts remain necessary. Retries must be bounded and account for the open circuit to avoid worsening the failure.
6. Database sharding: distribute data
Sharding distributes subsets of data across partitions hosted on separate servers. A multi-tenant application might use the organisation identifier to choose a shard. This approach becomes relevant when volumes or throughput exceed the reasonable capacity of one server, after reviewing queries and indexes.
The chosen key determines load distribution. If one organisation accounts for most activity, its shard may become overloaded while others remain lightly used. Cross-shard joins and transactions become more complex, as does rebalancing. Replication keeps copies; sharding distributes data. The two can be combined for different goals.
7. Caching layer: avoid repeated reads
An application cache, for example using Redis or Memcached, stores frequently accessed data. With cache-aside, the application checks the cache first. On a miss, it reads the database, populates the cache and returns the response. A frequently read, rarely modified catalogue may benefit from this approach.
The difficult part is freshness. A time to live limits an entry’s age without guaranteeing an up-to-date read after every write. You need to organise invalidation and plan for cache failure: a flood of requests returning to the database may overload it. I would first define the acceptable delay for the data, then choose an expiration strategy.
8. API gateway: organise API entry points
A gateway exposes a stable entry address in front of several services. For example, it routes /catalogue to one service and /commandes to another. Depending on configuration, it can verify authentication tokens or apply quotas. It becomes useful when several APIs must expose common rules to clients.
Services must retain business permissions tied to the data: being allowed to call a route does not authorise reading any order. The gateway also adds a critical component to the path. Its availability and configuration changes require as much attention as those of the services it exposes.
9. Reverse proxy: relay calls on the server side
A reverse proxy receives requests on behalf of origin servers. It can terminate the TLS connection, relay calls to the application and, depending on configuration, compress or cache responses. This is useful for exposing an application while centralising some HTTP settings.
Roles overlap: the same NGINX instance can act as a reverse proxy and load balancer. An API gateway can build on this behaviour by adding API-specific policies. These terms therefore do not necessarily refer to separate machines. You also need to control forwarded headers and prevent direct origin access if protection relies on the proxy.
10. Event-driven architecture: react to a business fact
In an event-driven architecture, a service publishes a fact, such as OrderConfirmed. Other processes can react by sending a notification or updating statistics. The producer does not need to know every consumer. A command requests an action; an event describes something that happened.
A queue is one possible transport mechanism; event-driven architecture organises interactions around these facts. You must decide how to evolve their format, handle duplicates and interpret their order. Real-time behaviour depends on delivery and processing delays. A lagging consumer does not provide an immediately up-to-date view.
Another difficulty arises between the database write and publication: a failure may leave an order recorded without an event. The transactional outbox pattern records the fact to publish in the same transaction as the business change, then sends it separately. Consumers must still tolerate repeated deliveries.
11. CQRS: distinguish read and write models
CQRS (Command Query Responsibility Segregation) separates commands that change state from queries that read it, using models suited to each use. In a booking system, the write side checks availability rules. The read side can offer a representation prepared for displaying the schedule. This separation becomes useful when business rules and query needs differ substantially.
The two models can share a database. CQRS requires neither Kafka nor event sourcing, which stores state changes as events. If a read projection is populated asynchronously, it may show a lagging state. You must accept that delay and manage rebuilding projections. For simple CRUD, the cost of this separation may outweigh its benefits.
What I would add to the list
When designing an application, I would complement this selection with timeouts and retries using progressive backoff and randomness, to avoid all clients retrying together. Idempotency, which lets an operation be repeated without repeating its business effect, becomes essential whenever a network outcome remains uncertain.
Before adding a component, take a specific flow, such as confirming an order. Note every remote call, the maximum acceptable delay and what the user will see on failure. Then measure waiting times and errors in that flow. This lets you choose a first pattern for an observable problem, then verify its effect.
Sources and useful links
- NGINX: HTTP load balancing (pattern 1)
- MDN: the role of a CDN (pattern 2)
- MDN: Cache-Control and shared caches (pattern 2)
- RabbitMQ: acknowledgements and publisher confirms (pattern 3)
- Apache Kafka: events, retention and consumers (pattern 3)
- MDN: HTTP 429 and Retry-After (pattern 4)
- NGINX: per-key limits and burst handling (pattern 4)
- Microsoft: circuit breaker (pattern 5)
- Microsoft: sharding and partition selection (pattern 6)
- Microsoft: cache-aside and consistency (pattern 7)
- Microsoft: gateway routing (pattern 8)
- Microsoft: authentication and API gateway policies (pattern 8)
- NGINX: how a reverse proxy works (pattern 9)
- Microsoft: event-driven architecture (pattern 10)
- Chris Richardson: transactional outbox (pattern 10)
- Microsoft: CQRS, shared databases and projections (pattern 11)
- AWS Builders’ Library: timeouts, retries and jitter