0% found this document useful (0 votes)
702 views1 page

System Design Blueprint

This document provides a system design blueprint for a domain name system (DNS). It includes a 3-step process for resolving domain names with (1) root nameservers, (2) top-level domain nameservers, and (3) authoritative nameservers. It also outlines several DNS optimization techniques including caching, geoDNS, and using multiple IP addresses.

Uploaded by

yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
702 views1 page

System Design Blueprint

This document provides a system design blueprint for a domain name system (DNS). It includes a 3-step process for resolving domain names with (1) root nameservers, (2) top-level domain nameservers, and (3) authoritative nameservers. It also outlines several DNS optimization techniques including caching, geoDNS, and using multiple IP addresses.

Uploaded by

yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DNS (3) Authoritative

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


𝗧𝗵𝗲 𝗨𝗹𝘁𝗶𝗺𝗮𝘁𝗲 𝗚𝘂𝗶𝗱𝗲
Domain
IP?
Domain
Detail
DNS Resolver :53 Port
(2) Top Level Domain ISP
#GeoDNS #Root #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 Mime Failed Status Codes
Request
(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)
Protocol) Fan Out - 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 Storage
#Lossless #Lossy
InMemory Key Checksum Timestamp Processing - Compression Ratio
Cache Miss & Hit - Read-Through #Lossless #Lossy
Checksum - Storage Consumed #Compression
Disk & Memory Usage - Write-Around Cache chunk_1 asdf23dsf3oj23098asfdf3 1532873423 Workers #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
#ACID #BASE Obj[0] Obj[1] . . . Log Processing
- On-Demand Expiration
Service
CACHE - Garbage Collector Pub/Sub Queue
RDMS
Cold Storage
Column Wide
Old Records
Document Search Service
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)

You might also like