You are on page 1of 1

4/20/23, 8:42 AM System Design Blueprint

DNS (3) Authoritative


Nameserver (ANS) 12.23.34.45
Domain
𝗦𝘆𝘀𝘁𝗲𝗺 𝗗𝗲𝘀𝗶𝗴𝗻 𝗕𝗹𝘂𝗲𝗽𝗿𝗶𝗻𝘁 :
IP?
Domain

(2) Top Level Domain


Detail
DNS Resolver :53 Port 𝗧𝗵𝗲 𝗨𝗹𝘁𝗶𝗺𝗮𝘁𝗲 𝗚𝘂𝗶𝗱𝗲
#GeoDNS #Root #ISP ISP App / User
Nameserver (TLD NS)
#LocalCache #MultipleIPs Metrics Options / Algo Security
ANS’s IP

TLD NS of
.com 4XX, 5XX, 2XX
Gzip, deflate
Response
Pagination
amazon.com Request ID Expiry Headers Response Time
(1) Root Nameserver Idempotent Key Failed Status Codes
Request Mime
(RN) Many more... Cookie Error Codes / Message
many more...

LOAD BALANCING
For Live Streaming / Chat Static / Stream with ABR

Input Validation - Cache Miss Outs


Authorization / Authentication
Api Gateway Load Balancer Frontend Servers CDN / Edge Servers - Active Resources
Api Gateway - Total Resources
Rate Limiting / Throttling #MultiPrimary #InMemoryConnections #Global #Regional #Static
Whitelist / Blacklisting
Flow Control
Authentication (OAuth 2.0) Access Logs Round Robin User Connection RTMP
Request Header Validations Status Codes Weighted Round Robin Serves
WebRTC
TLS Termination user_1 ada_inst_obj
Number of Requests Least Connections Websocket Static Content
Request Deduplication Active Connections Hash / Server Stickiness ... ... SSE (Server Side Events)
Metering / Usage data collection Random HTTP Short Polling - Push Hot Resource
Request Dispatching
HTTP Long Polling - Pull Rare Resource
- Bandwidth
Webhook - Hybrid
- Topics
Stream API

Dispatch Messages to
other FE Servers

DiskIO (if buffering)


CPU FrontEnd Servers Topic / Object ID
UUID
Memory
Auto Increment - Vertical Scale server_1 asdf23dsf3oj23098asfdf3
Auto Incr. Multiple
Latency
- Horizontal Dispatcher
Bandwidth ... ...
Servers (Odd / Even) Distributed ID
Twitter’s SnowFlakes
Generator Service
Offline Generations
Baidu UID generator Heartbeat
Sonyflake (UDP)
Backend Servers
#ClusterOfServers Upload Object Object Storage
Object Storage
- Leaderless #MicroService via Signed URL #S3 #Chunk #Raw
(#Gossip #S3 #Chunk #Raw - Count of messages
Redlock (Redis) Fan Out
Protocol) - Consumption Rate
Google Chubby Distributed
Apache Zookeeper
- Leader + For every new - In-Transit (Waiting for Ack)
Resource Locking Followers - Queue limit
Concurrency: Chunk Object
- Multi-Leaders - Serially
- Serially Batch
Obj[0] Obj[1] Obj[2] Obj[3] . . .
SERVICES TO SCALE SYSTEM - Pessimistic Locking
- Optimistic Locking
Message Queue
- Message Queue
- Compute Time - Pub/Sub Queue
Validate
- Failed Count
Checksum - CPU / Disk, etc

STREAMING CHUNK METADATA TABLE


Processed / Encoded
No. of items - Write-Through Validate #Lossless #Lossy
Storage
InMemory Key Checksum Timestamp Processing - Compression Ratio
Cache Miss & Hit - Read-Through Checksum #Lossless #Lossy
Cache Workers - Storage Consumed #Compression
Disk & Memory Usage - Write-Around chunk_1 asdf23dsf3oj23098asfdf3 1532873423 #Compression
#Fast - Object Count
- Write-Back
... ...

Sync
Eviction: Centrally UPLOAD VIDEO / IMAGE
- LRU (Least Recently used)
- LFU (Least Freq. Used)
Distributed
DATABASE
- FIFO
- MRU Cache
- Random Eviction #Eviction
Databases
- Least Used #Invalidation Log Processing
#ACID #BASE Obj[0] Obj[1] . . .
- On-Demand Expiration Service
CACHE - Garbage Collector Pub/Sub Queue
RDMS
Cold Storage
Column Wide
Old Records Search Service
Document
Key-Value #Index
Graph
QuadTree
Time-series RBAC (Role Based Notification Recommendation
Access Control) Service Service Analytics
Data Encryption Service
Query response Audit Trail
time - Spamming Filtering:
CPU / Disk Usage - Stop Words - Content-Based
Network Throughput - Dedup - Collaborative
Payment
Active Connections - Consistent Hashing - Retry with Idempotent Key
- Mod Hashing / Bloom Filter charge Service
Storage

With Idempotent Key


Range based Sharding
Hash based Sharding Third-Party Banking
Geographical Sharding
Service
Directory based Sharding

- Expired / Blocked / Invalid Card


- Service Down
- Quorum (Read / Write) - Insufficient Balance
Shards Replicas - Hinted-off COMMON FAN-OUT SERVICES
#HotNode #Hash #CrossGeo - Merkle Tree (Algo)

https://whimsical.com/system-design-blueprint-12yFLoBefBUFFASrJerpAz 1/1

You might also like