Back to Cheatsheets

System Design Cheatsheet

Essential system design patterns, architectures, and best practices for building scalable and reliable systems.

Architecture Patterns

Monolithic

Single application with all components tightly coupled

Microservices

Independent services communicating via APIs

Event-Driven

Services communicate through events and messages

Serverless

Functions as a service, no server management

CQRS

Command Query Responsibility Segregation

Scalability

Horizontal Scaling

Add more machines to distribute load

Vertical Scaling

Add more resources to existing machine

Load Balancing

Distribute traffic across multiple servers

Caching

Store frequently accessed data in memory

Database Sharding

Split database into smaller parts

High Availability

Active-Active

Multiple active nodes serving traffic

Active-Passive

One active node, others on standby

Failover

Automatic switch to backup system

Replication

Copy data across multiple nodes

Circuit Breaker

Prevent cascading failures

Data Management

ACID

Atomicity, Consistency, Isolation, Durability

BASE

Basically Available, Soft state, Eventually consistent

CAP Theorem

Consistency, Availability, Partition tolerance

Eventual Consistency

Data will be consistent eventually

Strong Consistency

Data is consistent immediately

Security

OAuth 2.0

Authorization framework

JWT

JSON Web Tokens for authentication

HTTPS

Secure communication over TLS

Rate Limiting

Limit requests per user/IP

CORS

Cross-Origin Resource Sharing

Performance

CDN

Content Delivery Network

Database Indexing

Optimize query performance

Connection Pooling

Reuse database connections

Asynchronous Processing

Handle tasks in background

Compression

Reduce data transfer size