SYSTEM DESIGNDesign a Payment Gateway (Stripe)StripeSquare
TRAFFIC LEVEL
—/3
CONSTRAINTS
Consistency modelStrong (ACID required)
Double-charge rateMust be 0%
Retry safetyAll endpoints idempotent
Availability target99.999% (5.26 min/yr downtime)
Audit requirementEvery state change logged
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
StripeSquare

Architect a B2B payment API. It must strictly guarantee 100% data consistency, no dropped payments, and absolute protection against double-charging due to network retries.

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