SYSTEM DESIGNDesign an Ad Click Aggregation SystemGoogleFacebookAmazon
TRAFFIC LEVEL
—/3
CONSTRAINTS
Click events/sec1,000,000
Unique ads100M
Aggregate granularity1-minute windows
Billing update SLA< 2 min lag
Historical retention3 years
Compute & Network
Load BalancerDistribute traffic
API GatewayEntry point / auth
API ServerBusiness logic
Worker NodeAsync processing
CDN EdgeGlobal cache
WebSocket GatewayPersistent connections
Data Stores
PostgreSQLRelational DB
MySQLRelational DB
CassandraWide-Column DB
DynamoDBNoSQL / Managed
S3 BucketObject storage
Queues & Cache
Redis CacheIn-memory store
KafkaEvent stream
ZookeeperCoordination
Specialized
Bloom FilterProbabilistic set
Rate LimiterThrottling
Geohash ServiceGeospatial index
Trie ServerPrefix search
APNS / FCMPush notifications
AggregatorBatch / roll-up
Drag to canvas · Hover node for × to delete · Draw from handle to connect
Design your architecture
Drag components from the left panel · Connect them by drawing from a node handle · Hit Start Simulation to validate
🚨 INCIDENT
GoogleFacebookAmazon

Design a system to count ad clicks for billing and analytics. Ad networks must know clicks-per-ad-per-minute to charge advertisers and detect click fraud. Handle 1M click events/sec, deliver per-minute aggregates in < 2 minutes, and store historical data for 3 years for reporting.

📥 Assigned to:You — Senior Engineer
SCALE LEVELS
1
10,000 RPS
Target: <100ms
2
100,000 RPS
Target: <500ms
3
1,000,000 RPS
Target: <200ms
GLOBAL SUCCESS RATE
100.0%
P99 LATENCY
45ms
Target: < 200ms
TOTAL RPS INGESTED0 / 11,000
EngPrep — Real Engineering. Real Interviews.