← Home

High-Level Design

21 posts

Distributed systems, scalability, and architecture.

Hardhigh level designdistributed systemsdatabasesstorage

Storage Engines: LSM-Trees vs B-Trees

Every database makes one foundational choice — how to lay bytes on disk. B-trees update in place; LSM-trees never overwrite, they append and compact. That single decision sets your write throughput, read latency, and space usage. Drive an LSM write path — memtable, flush, compaction — and see the tradeoff for yourself.

Asked at Google, Meta, Amazon +3
·14 min read

System Design Case Studies2-part series

Hardsystem design interviewdistributed systemsmessage queuesrealtime

Design a Chat System

WhatsApp-scale messaging, built end to end: persistent WebSocket gateways, a user→server registry, store-and-forward for offline devices, the one-tick / two-tick / blue-tick delivery state machine, message ordering, and group fan-out. Drive the delivery protocol yourself, then take it apart.

Asked at Meta, WhatsApp, Slack +3
·14 min read
Hardsystem design interviewdistributed systemscachingscalability

Design a News Feed

The Twitter/Instagram timeline, worked end to end. The whole system pivots on one decision — do you build a follower's feed when someone posts (push), or when they open the app (pull)? Toggle between them, watch the write and read cost flip, and see why one celebrity breaks the naive answer.

Asked at Meta, Twitter, Instagram +3
·13 min read