System design templates

Nine reference architectures you can run, break and fix — each with a scripted fault and a lesson to look for.

Side project architecture running in the simulatorSmall

Side project

One small server and an embedded database. Traffic ramps up until the single machine runs out of memory.

Small startup architecture running in the simulatorStartup

Small startup

Nginx in front of two app servers and one PostgreSQL. The app tier scales; the database becomes the bottleneck.

Cached web app architecture running in the simulatorStartup

Cached web app

ALB → three EC2 servers using ElastiCache (cache-aside) in front of RDS PostgreSQL. At 60 s Redis is flushed.

Read-heavy at scale architecture running in the simulatorScale-up

Read-heavy at scale

CloudFront → ALB → an auto-scaling group → Aurora with two read replicas. At 40 s the primary fails.

Async pipeline architecture running in the simulatorScale-up

Async pipeline

API Gateway → Lambda → SQS → workers → DynamoDB. A traffic spike hits at 20 s.

Event-driven microservices architecture running in the simulatorScale-up

Event-driven microservices

ALB → EKS → Kafka (MSK, 6 partitions, 60 s retention) → consumers → PostgreSQL and OpenSearch.

Serverless edge architecture running in the simulatorStartup

Serverless edge

Vercel functions → Neon Postgres, with Upstash Redis as a cache. Every function invocation can open a database connection.

Multi-region architecture running in the simulatorGlobal

Multi-region

Route 53 → two zones, each with an ALB and EKS → Aurora writer in zone A with a replica in zone B. Zone A fails at 40 s.

Feed / timeline architecture running in the simulatorGlobal

Feed / timeline

API servers → Redis → Cassandra. A celebrity post makes one key take 60% of the traffic.