Category

hld

19 articles across 7 sub-topics

System Design HLD Example: Web Crawler

System Design HLD Example: Web Crawler

TLDR: A distributed web crawler must balance global throughput with per-domain politeness. The architectural crux is the URL Frontier, which manages priority and rate-limiting across a distributed fetcher pool. By combining Bloom Filters for URL dedu...

17 min read

System Design HLD Example: Video Streaming (YouTube/Netflix)

TLDR: A video streaming platform is a two-sided architectural beast: a batch-oriented transcoding pipeline that converts raw uploads into multi-resolution segments, and a real-time global delivery network that serves those segments via CDNs. The tech...

16 min read

System Design HLD Example: Ride-Sharing (Uber/Lyft)

TLDR: A ride-sharing platform is a high-velocity geospatial matching engine. Drivers stream GPS coordinates every 5 seconds into a Redis Geospatial Index. When a rider requests a trip, the Matching Service executes a GEORADIUS query to find the 10 cl...

15 min read

System Design HLD Example: Real-Time Leaderboard

TLDR: Real-time leaderboards for 10M+ active users require an in-memory ranking engine. Redis Sorted Sets (ZSET) are the industry standard, providing $O(\log N)$ updates and rank lookups via an internal Skip List data structure. Relational databases ...

15 min read

System Design HLD Example: Hotel Booking System (Airbnb)

TLDR: A robust hotel booking system must guarantee atomicity in inventory subtraction. The core trade-off is Consistency vs. Availability: we prioritize strong consistency for the booking path (PostgreSQL with Optimistic Locking) while allowing event...

14 min read

System Design HLD Example: E-Commerce Platform (Amazon)

TLDR: A large-scale e-commerce platform separates catalog, cart, inventory, orders, and payments into independent microservices. The core architectural challenge is Inventory Correctness during flash sales—solved with a two-phase reservation pattern:...

13 min read

System Design HLD Example: Collaborative Document Editing (Google Docs)

TLDR: Real-time collaborative editing relies on Operational Transformation (OT) or CRDTs to resolve concurrent edits without data loss. The core trade-off is Latency vs. Consistency: we use optimistic local updates for zero-latency typing and a centr...

13 min read
System Design HLD Example: URL Shortener (TinyURL and Bitly)

System Design HLD Example: URL Shortener (TinyURL and Bitly)

TLDR: A URL shortener is a read-heavy system (100:1 ratio) that maps long URLs to short, unique aliases. The core scaling challenge is generating unique IDs without database contention—solved using a Range-Based ID Generator or a Distributed Counter ...

16 min read

System Design HLD Example: Payment Processing Platform

TLDR: Payment systems optimize for correctness first, then throughput. This guide covers idempotency, double-entry ledgers, and reconciliation. Stripe processes over 250 million API requests per day, and every single payment must be idempotent: a us...

15 min read

System Design HLD Example: Notification Service (Email, SMS, Push)

TLDR: A notification platform routes events to per-channel Kafka queues, deduplicates with Redis, and tracks delivery via webhooks — ensuring that critical alerts like password resets never get blocked by marketing batches. Uber sends over 1 million...

17 min read

System Design HLD Example: News Feed (Home Timeline)

TLDR: A news feed system builds personalized timelines by combining content publishing, graph relationships, and ranking. The scalability crux is the fan-out amplified write path: a single celebrity post can trigger 100M writes. A hybrid fan-out stra...

18 min read

System Design HLD Example: File Storage and Sync (Dropbox and Google Drive)

TLDR: Cloud sync systems separate immutable blob storage (S3) from atomic metadata operations (PostgreSQL), using chunk-level deduplication to optimize storage costs and delta-sync events to minimize bandwidth. Dropbox serves 700 million registered ...

15 min read

System Design HLD Example: Distributed Cache Platform

TLDR: Distributed caches trade strict consistency for sub-millisecond read latency, using consistent hashing to scale horizontally without causing database-shattering "cache stampedes" during cluster rebalancing. Instagram's primary database once se...

14 min read