Category
postgres
2 articles
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: 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
