← Back to home

Design & Development

A curated set of deep dives on system design, low-level design, and backend engineering — written for interview prep, case studies, and battle-tested production patterns.

Deep Dives
Topics
0 Visited by You
Showing
🔍 /
JavaScript · Node.js

JavaScript & Node.js Interview Guide

Story-driven walkthrough of every JS & Node question that shows up in rounds — hoisting, closures, event loop, promises, streams, clustering, debugging, security. 25 sections with code & diagrams.

Java

Java 25 Interview Cheat Sheet

Compact source files, flexible constructor bodies, module import declarations, primitive pattern matching, scoped values, and more — everything new in Java 25 for interviews.

Java · Storytelling

Java Interview Guide

20 deep dives across OOP, Strings, Collections, HashMap internals, threads, locks, JVM memory, GC, ClassLoaders, Streams, and the tricky gotchas — every concept walked through with a real-world scene and analogies you'll actually remember.

Spring Boot · Storytelling

Spring Boot Interview Guide

30 deep dives across IoC & DI, beans, auto-config, MVC, Data JPA, transactions, security, JWT, caching, async, microservices, and the gotchas every Spring dev hits in production — each topic walked through with a scene, analogy, and code.

Kafka · Payments

Kafka & Payment Idempotency

Deep dive on exactly-once semantics, idempotent producers, transactional outbox, and safely handling payment workflows under retries and partial failures.

System Design · LLD

LLD Interview Roadmap

Structured path to master low-level design interviews — SOLID, design patterns, concurrency building blocks, and the 20 problems you actually see in rounds.

LLD · In a Hurry · Part 1

LLD Introduction — What These Interviews Actually Test

Story-driven intro to low-level design — LLD vs HLD, the four scoring pillars, SOLID as a spine, and the six question shapes you'll meet in the wild. Part 1 of a 3-part in-a-hurry series.

LLD · In a Hurry · Part 2

The 5-Step LLD Framework — A 45-Minute Playbook

Minute-by-minute playbook for any LLD prompt — Requirements, Entities, Class Diagram, Patterns + Sequence, Java Code — closed by a full Parking Lot walkthrough script with timing annotations.

LLD · In a Hurry · Part 3

Common LLD Patterns — The 8 You'll Actually Use

The eight GoF patterns that appear in 90% of LLD interviews — Strategy, Factory, Singleton, Observer, State, Decorator, Builder, Command. When each fits, the smell that summons it, and a one-page Java sketch each.

LLD · Case Study

Vending Machine — LLD Design

End-to-end object model, state machine, and class design for the classic LLD question — from requirements to code, with trade-off discussions at each step.

LLD · Case Study

Parking Lot — LLD Design

A multi-floor smart parking lot built from a paper-ticket booth — Singleton + Strategy + State + Observer, full Java code, lost-ticket flow, peak-hour pricing decorator, and every gap in Grokking's classic answer plugged.

LLD · Case Study

ATM System — LLD Design

A real ATM — 8-state machine for the device, Strategy for transactions, Chain of Responsibility for cash dispensing in mixed denominations, 2-phase debit so a jam never costs the customer, and full Java code with every Grokking gap plugged.

LLD · Case Study

Library Management — LLD Design

A real lending library — Repository search (not HashMap), FIFO ReservationQueue per book, BookItem state machine, Observer-based notifications, FineStrategy per member-type, and Grokking's classic single-slot reservation bug fixed.

LLD · Case Study

Movie Ticket Booking — LLD Design

A real BookMyShow-style booking — atomic seat-locking with TTL, Saga payment flow with compensations, decorator pricing for peak-hour + premium-seat surcharges, and the concurrency story Grokking glosses over (three users clicking F-12 at the same instant).

LLD · Case Study

Notification Service — LLD Design

Multi-channel sender (Email/SMS/Push/WhatsApp) with the API-vs-worker split that keeps Order Service unblocked when SendGrid is slow — Strategy + Factory + Decorator + retries with backoff, idempotency at two layers, and rate limits per user & provider.

LLD · Case Study

MakeMyTrip — LLD Interview Design

Full interview-grade design: requirements, entities, 10 design patterns mapped to real variability, booking state machine, concurrency, and 15 follow-up cross-questions with model answers.

HLD · Security

OTP Validation System — HLD Design

Production-ready OTP architecture: Redis + Postgres split, bcrypt hashing, 5-layer brute-force defense, per-use-case TTLs, replay protection, and every mistake to avoid.

HLD · Framework

HLD Interview Framework — The 4-Step Delivery

A 45-minute playbook for any HLD interview — Requirements → Core Entities → APIs → High-Level Design → Deep Dives. The four evaluation pillars interviewers actually score, common mistakes to avoid, and the specificity test that separates senior from junior.

HLD · Reference

8 Common HLD Patterns — Reference Catalog

Real-time updates, long-running tasks, contention, scaling reads, scaling writes, large blobs, multi-step sagas, proximity-based services — each with when-to-use, decision tree, trade-offs, and 2–3 cross-links to live HLDs on this site.

HLD · Reference

Key Technologies Cheat Sheet — Redis, Kafka, ES, Cassandra…

Move from "I'll use Redis" to "Redis HASH per user_id, LRU at 64GB/node, sharded across 6 nodes via consistent hashing" — the specificity that lands offers. Decision trees for SQL vs NoSQL, L4 vs L7, Kafka vs SQS, Redis vs Memcached.

HLD · Case Study

WhatsApp — HLD Design

End-to-end encrypted messaging at 2B-user scale — Signal Protocol's X3DH + Double Ratchet, multi-device fan-out (server can't read your messages), group sender keys, WebRTC for voice/video with TURN fallback, and the connection-server cluster holding 50K WebSockets each.

HLD · Case Study

Top-K Service — HLD Design

Trending Now from 100K events/sec — Count-Min Sketch + Min-Heap for approximate top-K in fixed memory regardless of cardinality, sliding windows via per-minute sketch buckets, Flink-driven aggregation, and the trade-off vs exact counting.

HLD · Case Study

Ad Click Aggregator — HLD Design

1M clicks/sec where every click is billed — exactly-once aggregation via Kafka + Flink with idempotency keys, hot-ad sub-sharding, real-time Redis dashboards alongside daily Spark reconciliation against payment networks, fraud detection, and PCI-style audit.

HLD · Case Study

Google Docs — HLD Design

Real-time collaborative editing with sub-200ms keystroke latency — Operational Transformation for conflict resolution, Doc Session Server holding the canonical op log per document, offline merge on reconnect, op-log + snapshot persistence, and revision history reconstruction.

HLD · Case Study

Payment System — HLD Design

Move money without losing or duplicating a cent — idempotency-key + DB UNIQUE for safe retries, double-entry ledger with sum-to-zero invariants, Temporal saga with compensating actions for multi-step rollback, fraud scoring, and PCI tokenization to keep raw card numbers out of your servers.

HLD · Case Study

Distributed Cache — HLD Design

Build Redis Cluster from first principles — consistent-hashing ring with virtual nodes, sync vs async replication, LRU/LFU/TTL eviction trade-offs, write-through vs write-around vs write-back, hot-key splitting, cache-stampede protection via request coalescing, and Sentinel-driven failover.

HLD · Case Study

Job Scheduler — HLD Design

"Send reminder in 3 days" at billions-of-jobs scale — time-bucketed storage so finding due jobs is O(1), two-tier cold-DynamoDB + hot-Redis-ZSET split, leased execution for crash safety, ZooKeeper-driven partition assignment, and exactly-once-effective via idempotency keys.

HLD · Case Study

Pastebin — HLD Design

The metadata-vs-blob plane split that makes a paste service scale — KGS-backed unique keys, S3 for content, MySQL/Cassandra for metadata, multi-tier cache, and the 5:1 read:write ratio that drives every choice.

HLD · Case Study

Instagram — HLD Design

Three planes — Upload, Serve, Feed — with photo sharding by photo_id, fan-out vs fan-in for news feed, and the celebrity-user hybrid that makes 100M followers tractable. 1425TB of blobs over 10 years, plus the exact ER diagram + capacity math.

HLD · Case Study

Facebook Messenger — HLD Design

From polling to WebSockets — chat servers each holding 50K open connections, HBase for time-sorted message storage, Kafka for cross-server fan-out, presence service that scales to 500M users without broadcast storms.

HLD · Case Study

Twitter — HLD Design

325K reads/sec timeline assembly via the push/pull hybrid — fan-out-on-write for normal users, pull for celebrities like Elon, merge on read. 64-bit time-sortable tweet IDs, Cassandra sharded by tweet_id, plus trending topics & who-to-follow.

HLD · Case Study

Youtube / Netflix — HLD Design

Why CDN is non-negotiable for video — three-plane architecture (Upload, Transcode, Serve) with adaptive bitrate streaming, perceptual-hash dedup, and the 1TB/sec egress problem solved by edge POPs. 25GB/sec ingest math + transcode pipeline.

HLD · Case Study

Typeahead Suggestion — HLD Design

In-memory trie with offline frequency updates — why SQL LIKE can't do 60K QPS in under 200ms, how partition-by-hash + aggregator merge handles "give me top 10 for prefix sy", and the EMA-based ranking that makes trends bubble up.

HLD · Case Study

API Rate Limiter — HLD Design

Five algorithms compared (fixed window, sliding window, sliding-with-counters, token bucket, leaky bucket), the atomic-INCR race condition solved with Redis Lua, and the IP-vs-user-vs-API-key hybrid that protects /login without locking real users out.

HLD · Case Study

Twitter Search — HLD Design

Inverted index over 730 billion tweets in under 200ms — shard-by-tweet_id with aggregator fan-in, per-shard local indexes, the reverse-index trick that makes crash recovery fast, and the ranking pipeline that scores recency + popularity + engagement.

HLD · Case Study

Web Crawler — HLD Design

15B pages in 4 weeks at 6200 pages/sec — sharded URL frontier with per-host politeness queues, robots.txt cache, document & URL dedupe via SHA checksums (no bloom filters!), checkpointing for week-long crawl resilience, and crawler-trap defenses.

HLD · Case Study

Facebook Newsfeed — HLD Design

Pre-computed personalized feeds for 300M DAU — the push/pull/hybrid trade-off, ML ranking by relevance + recency + engagement, multi-tier cache (in-process → Redis → DB), and how new posts hit followers' feeds within 5 seconds.

HLD · Case Study

Yelp / Nearby Friends — HLD Design

QuadTree spatial index for "find me ramen within 1 mile" across 500M places — why fixed grids fail in Manhattan, how dynamic 4-way splits keep leaf density uniform, doubly-linked leaves for fast neighbor traversal, and the QuadTree-Index reverse map for crash recovery.

HLD · Case Study

Uber Backend — HLD Design

167K driver location updates/sec without melting the QuadTree — the DriverLocationHT in-memory hash table that absorbs the firehose, lazy 15-second QuadTree refresh, and the Notification Service pub/sub that pushes live driver positions to subscribed riders.

HLD · Case Study

Ticketmaster / BookMyShow — HLD Design

50K fans hitting "buy" on the same 200 seats at 09:00:00.001 — SERIALIZABLE isolation + SELECT FOR UPDATE to prevent double-bookings, ActiveReservationsService with 5-min holds, and the WaitingUsersService FIFO queue that wakes the next buyer when a hold expires.

HLD · Case Study

TinyURL / Short URL Service — HLD Design

Three-pass story arc from "one MySQL box" to a sharded NoSQL store fronted by a CDN, Memcached, and a Key Generation Service that pre-generates 6-char keys offline so the write path never collides — write/read/key-gen split, 20K redirects/sec, full capacity math.

HLD · Case Study

Dropbox / Google Drive — HLD Design

File sync at planet scale: 4 MB chunking, in-line dedup, presigned-URL uploads, sharded metadata, long-poll notification fabric, conflict resolution, and the data-vs-control-plane split that makes it all work.

HLD · Case Study

LeetCode / Online Judge — HLD Design

Running strangers' code without setting the host on fire: gVisor/Firecracker sandboxes, async submission queue, WebSocket verdict push, Redis ZSET leaderboards, and the web-tier vs. judge-tier split that makes 5K hostile submissions/sec routine.

Tech · Distributed Systems

Distributed Unique ID Generation — Deep Dive

How big systems generate unique IDs across many servers — explained simply. UUIDs (v4 & v7), Snowflake's 64-bit layout, the boot-only coordinator pattern, common mistakes, and a decision guide for when to use which.

Tech · Algorithm Deep Dive

Median of 10 Billion Integers — Bucket Counting

50 files, 40 GB of data, 16 GB of RAM. Why sorting is the wrong instinct, and how two passes of bucket counting find the exact median in ~1 MB of memory. Worked example, edge cases, and when this idea breaks.

LLD · Case Study

Hotel Management — LLD Design

End-to-end hotel system design: actors & use cases, class/ER diagrams, full MySQL DDL with composite indexes, booking concurrency with pessimistic locks, sequence flows, and interview Q&A.

Backend · Quick Reference

Backend Fundamentals — DNS, HTTP, Docker, Circuit Breaker

How DNS resolves & caches, the 9 HTTP methods, Dockerfile anatomy, VM vs container deployment, API Gateway vs Load Balancer, and circuit breaker interview Q&A.

Docker · Interview Deep Dive

Docker — Complete Interview Deep Dive

Architecture (dockerd / containerd / runc), image layers & union FS, every Dockerfile instruction, CMD vs ENTRYPOINT, networking, volumes, namespaces & cgroups, Compose, and 12 Q&As.

Browser Storage · Deep Dive + Live Demos

Browser Storage — Cookies, localStorage & sessionStorage

The three browser storage mechanisms compared end-to-end. Cookies (Set-Cookie, Domain/Path/SameSite/Secure/HttpOnly/__Host-), the Web Storage API, real-world use cases, XSS/CSRF defenses, third-party deprecation & CHIPS — plus three in-page playgrounds to set, inspect, and delete data live.

Networking · OSI Model

Networking — The OSI 7-Layer Model

Every OSI layer explained in detail — PDUs, protocols, devices — plus a mnemonic to remember the order, data encapsulation flow, OSI vs TCP/IP, and 10 interview Q&As.