Pastebin System Design
Step 1 of 11
Architectural Trade-offs & Specs
0.25x
0.5x
1.0x
1.5x
2.0x
CDN Edge Cache
Key
Content Preview
Status
Client Browser
New Paste Content
User: usr_42
Secure database credentials...
Expires in 5 Min
Expires in 1 Hour
Expires in 1 Day
Create Paste
Load Balancer & API GW
Strategy:
Least Connections
Rate Limiter:
Sliding Window Log
Ip limit tokens:
Key Generation Service (KGS)
Unused Pre-Generated Keys Buffer:
DB Standby Pool size:
9,842,104 keys
API Application Server
Worker Pool status:
Healthy
Active operation:
IDLE
In-Memory Cache (Metadata)
[No cached headers]
Amazon S3 Object Store
Bucket /pastes/*:
Metadata DB (SQL RDBMS)
Key
S3 URL
Expiration
User
Expiration Cleaner
Cleaner daemon loaded.
Educational Notes:
Base62 KGS:
Using a pool of keys avoids database locking, coordinates, and latency at write time.
Storage Segregation:
S3 Object Store holds the large files, keeping SQL index rows slim and cached.
Draggable nodes:
Drag any component title bar! Connected paths and traveling message particles update in real time.
Component Inspector