🏗️

System Design Patterns

Backend architecture patterns—load balancing, caching, microservices, message queues. 25 patterns for building scalable, reliable systems.

24 patterns

System design patterns solve infrastructure challenges at scale. These 25 patterns cover load balancing (distribute traffic), caching (speed up reads), database sharding (horizontal scaling), microservices (independent deployments), message queues (async processing), circuit breakers (graceful degradation), and more. Choose patterns based on your scale—most startups need only 2-3 of these until they hit real growth. Don't over-engineer early.

All System Design Patterns

Load Balancing

Load balancing distributes incoming traffic across multiple servers. Learn when to use load balancers and common strategies.

load-balancingscalinghigh-availability

Caching

Caching stores frequently-accessed data in fast storage. Learn caching strategies, when to cache, and common pitfalls.

cachingperformanceredis

Database Sharding

Sharding splits your database across multiple servers. Learn when to shard, sharding strategies, and common challenges.

shardingdatabasescaling

Microservices

Microservices split your app into independent services. Learn when to use microservices vs monoliths and migration strategies.

microservicesarchitecturedistributed-systems

Message Queue

Message queues let services communicate asynchronously. Learn when to use queues, common tools, and patterns.

message-queueasyncbackground-jobs

Service Mesh

A service mesh manages service-to-service communication in microservices. Learn when to use service mesh and common tools.

service-meshmicroservicesistio

Event Sourcing

Event Sourcing stores every state change as an event. Learn when to use event sourcing, benefits, and complexity trade-offs.

event-sourcingarchitectureaudit-trail

Circuit Breaker

Circuit breakers prevent cascading failures by stopping requests to failing services. Learn how circuit breakers work.

circuit-breakerresiliencefault-tolerance

Blue-Green Deployment

Blue-Green deployment runs two identical environments. Learn how to achieve zero-downtime deploys with blue-green strategy.

blue-greendeploymentdevops

Database Replication

Database replication copies data to multiple databases. Learn replication strategies, read replicas, and best practices.

database-replicationread-replicascaling

Idempotency

Idempotent operations can be called multiple times safely. Learn how to make APIs idempotent and prevent duplicate actions.

idempotencyapi-designreliability

CDN (Content Delivery Network)

CDNs cache content at edge servers worldwide for fast delivery. Learn when to use CDNs and how they improve performance.

cdnperformancecaching

Horizontal Scaling

Horizontal scaling adds more servers to handle load. Learn horizontal vs vertical scaling and when to scale out.

scalinghorizontal-scalingcloud

API Rate Limiting

Rate limiting restricts how many API requests users can make. Learn rate limiting strategies and implementation.

rate-limitingapi-securitythrottling

WebSockets

WebSockets enable real-time, two-way communication between client and server. Learn when to use WebSockets vs HTTP.

websocketsreal-timebidirectional

GraphQL

GraphQL lets clients request exactly the data they need. Learn GraphQL vs REST and when to use each.

graphqlapi-designquery-language

Serverless

Serverless lets you run code without managing servers. Learn when to use serverless, benefits, and limitations.

serverlesslambdafaas

Database Indexing

Database indexes make queries fast by creating lookup tables. Learn when to add indexes and common pitfalls.

databaseindexingquery-optimization

Monolith Architecture

Monolith architecture keeps all code in one application. Learn when monoliths work and when to migrate to microservices.

monolitharchitecturemonolithic

Event-Driven Architecture

Event-driven architecture processes events asynchronously. Learn when to use event-driven systems and common patterns.

event-drivenarchitectureasync

CQRS (Command Query Responsibility Segregation)

CQRS separates read and write operations into different models. Learn when CQRS helps and added complexity.

cqrsarchitectureevent-sourcing

Pub/Sub (Publish-Subscribe)

Pub/Sub lets publishers send messages to multiple subscribers. Learn pub/sub patterns and when to use them.

pub-submessagingkafka

Webhooks

Webhooks notify your app when events happen via HTTP POST. Learn how to implement and consume webhooks.

webhookshttp-callbacksevents

gRPC

gRPC is a high-performance RPC framework using Protocol Buffers. Learn when to use gRPC vs REST.

grpcrpcprotocol-buffers