← Back to dhruvtechbytes.com

HLD Live Cohort 1.0 — Simulators

Class simulators

Run the concepts from class yourself. Each simulator has guided scenarios: what to click, what to watch, and what to take away. Switch between Hinglish and English at the top right of any simulator.

4 are free to try. The other 34 are for HLD Live Cohort students.

Student? Unlock all →

Class 02 — Week 01

Basic Networking Fundamentals

  1. 01 Cohort onlyTCP vs UDPHandshake, ACKs, packet loss and retransmission side by side. A file download vs BGMI position updates vs a DNS query.4 scenariosUnlock →
  2. 02 Cohort onlyShort Polling vs Long Polling vs WebSocketsThree clients on the same Swiggy / chat updates: wasted requests, delay, open connections, LB timeouts and a million-user projection.6 scenariosUnlock →
  3. 03FreeDNS ResolutionBrowser and OS cache, recursive resolver, root, .com TLD and GoDaddy with dhruvtechbytes.com's real records. TTL, CNAME, NXDOMAIN, migration and DNS vs LB.7 scenariosOpen simulator →
  4. 04 Cohort onlyHTTP/1.1 vs HTTP/2 vs HTTP/3One Flipkart page load as three waterfalls: six connections vs multiplexing vs QUIC, head-of-line blocking on packet loss, and a WiFi to 4G switch.3 scenariosUnlock →

Class 03 — Week 02

Networking & Scaling Fundamentals

  1. 01 Cohort onlyCDNUsers in 4 regions, edge PoPs and a Mumbai origin. Cache hits and misses, TTL, purge, cache keys, DNS steering vs anycast, traffic spikes.8 scenariosUnlock →
  2. 02 Cohort onlyBGP Anycast basicsThree PoPs advertise one IP range, networks learn routes, and a Delhi request follows them step by step. Withdraw, kill or crash a PoP and watch traffic move.9 guided stepsUnlock →
  3. 03 Cohort onlyForward ProxyAn office network behind a proxy: blocking sites, hiding client IPs, what HTTPS hides, and who resolves DNS.5 scenariosUnlock →
  4. 04 Cohort onlyReverse ProxyOne public IP in front of private servers: routing, TLS termination, caching, hiding headers, and failover with two proxies.5 scenariosUnlock →
  5. 05FreeLoad Balancer AlgorithmsRound Robin, Weighted, Least Connections, IP Hash, Least Response Time and more. Kill or slow a server, fire a burst of 50 requests.5 scenariosOpen simulator →
  6. 06 Cohort onlyHealth ChecksTCP vs /health vs /ready vs deep checks. Crashes, hangs, flaky servers, deploys and a database outage.7 scenariosUnlock →
  7. 07 Cohort onlyAPI GatewaySingle entry point, authentication vs authorization, rate limiting with local vs Redis counters, 413s, aggregation, circuit breakers and gateway HA.7 scenariosUnlock →
  8. 08 Cohort onlyVertical vs Horizontal ScalingA Swiggy dinner rush and an IRCTC Tatkal spike. Grow one server to 64 CPU or run up to 30, with autoscaling, scheduled scaling and shared sessions.7 scenariosUnlock →
  9. 09FreeSystem Builder: put it all togetherDrag DNS, CDN, proxies, load balancers, an API gateway and servers onto a canvas, wire them up and run traffic through your design. 8 build-along steps and a live design review.8 scenariosOpen simulator →

Class 04 — Week 02

Database Selection

  1. 01FreeMongoDB WiredTiger: how writes reach diskSend updates and inserts and watch the cache, dirty pages, _id index, journal and checkpoints. Fill the cache to see eviction, then crash mongod and recover from checkpoint + journal.12 guided stepsOpen simulator →
  2. 02 Cohort onlyCassandra LSM Tree: writes, reads, compactionPUT, GET and DELETE against a Cassandra node. Watch the Commit Log and MemTable, flushes to immutable SSTables, per-SSTable Bloom filters (with real false positives), tombstones, compaction and write amplification, then crash and replay.13 guided stepsUnlock →
  3. 03 Cohort onlyNeo4j: how a graph is stored and traversedSee the graph, then its node and relationship records with firstRel / next pointer chains, the index and the Page Cache. Traverse hop by hop, run a Cypher query, write through the transaction log, checkpoint, crash and recover, and hit a supernode.10 guided stepsUnlock →
  4. 04 Cohort onlyRedis: the key-value store from the insideType real Redis commands and watch hash(key) % 8 pick a bucket, collision chains, and String, Hash, List, Set and Sorted Set values. Plus atomic INCR, TTL with lazy expiry, RDB vs AOF crash recovery and maxmemory eviction.11 guided stepsUnlock →

Class 05 — Week 03

DB Access Patterns & Indexing

  1. 01 Cohort onlyB+ Tree Index: inserts, splits, search, rangeA full table scan for order_id = 55 page by page, then a B+ Tree index built key by key: watch the middle key go up before every leaf and root split, a search read 3 index pages + 1 table page, and a range scan walk the linked leaves.11 guided stepsUnlock →
  2. 02 Cohort onlyGeohashing on a real mapCut the world map in half again and again around India Gate: lng / lat bits, interleaving, Base32 down to ttnfv2u, a prefix search that misses nearby restaurants, the 97 m boundary case and the 8-neighbour fix.9 guided stepsUnlock →
  3. 03 Cohort onlyQuadtree: splitting India into cellsHospitals across India, max 4 per cell: watch cells split level by level, the tree grow deep over cities, an insert that splits a leaf, a Delhi NCR search that skips most cells, and the max-depth limit.7 guided stepsUnlock →
  4. 04 Cohort onlyR-Tree: bounding rectanglesHospitals and national parks get MBRs, leaves and a root. Search 180 km around India Gate, skip whole subtrees, catch a park whose rectangle touches but shape does not, and pay for overlapping rectangles.6 guided stepsUnlock →

Class 06 — Week 03

URL Shortener Live Design & High Availability

  1. 01 Cohort onlyURL Shortener: unique IDs to redirectsThree app servers collide on ID 101, then pick a fix and walk its path: a Ticket Server that goes down, Snowflake IDs with a clock rollback, or ZooKeeper ranges with a rejected versioned write, prefetch, a crash and a leader election. Plus a redirect path through Redis, a lagging replica and the primary.5 guided pathsUnlock →

Class 07 — Week 04

Replication, Sharding & Partitioning

  1. 01 Cohort onlyDistributed DB design: one server to Dynamo-styleAn HLD diagram that grows one bottleneck at a time: one server fills up, hash % N reshuffles 9 of 12 keys, a virtual ring moves only 2, then replication, quorum (W = 3 fails, W = 1 reads stale), a Delhi vs Mumbai conflict merged to {A:2, C:1}, hinted handoff, read repair, gossip, Merkle trees and an end-to-end PUT and GET.20 guided stepsUnlock →
  2. 02 Cohort onlyConsistent hashing, vector clocks and repairWalk keys around the ring, add and remove nodes, split load with vnodes, watch random coordinators grow a vector clock and compare clocks node by node, then follow a hint to a recovering replica and a read repair.15 guided stepsUnlock →

Class 08 — Week 04

Caching

  1. 01 Cohort onlyCaching strategies: Cache-Aside to Write-AroundOne Instagram profile and one post through every strategy: no cache vs a 96% hit ratio, Cache-Aside, a Read-Through loader, Write-Through with a failed DB write, Write-Back likes lost in a crash, and Write-Around posts that never fill the cache.11 guided stepsUnlock →
  2. 02 Cohort onlyTTL and cache invalidationA clock-driven TTL with lazy and active expiry and the three TTL replies, then stale reads, delete vs refresh, the DEL-first race, a failed DEL, and a Transactional Outbox that retries when the consumer is down.10 guided stepsUnlock →
  3. 03 Cohort onlyCache StampedeA celebrity key expires and 12 requests rush the DB past its capacity. Fix it with a Redis lock (and a lock owner that crashes), per-process singleflight, probabilistic early refresh and stale while refresh.7 guided stepsUnlock →
  4. 04 Cohort onlyCache PenetrationIDs that do not exist go straight to the DB. Negative caching, random-ID attacks, a too-long NOT_FOUND TTL, a live 32-bit Bloom filter with a real false positive, and rate limiting.8 guided stepsUnlock →
  5. 05 Cohort onlyCache Avalanche24 keys with the same TTL expire together and the DB load chart spikes. Then Redis goes down, TTL jitter, a cold vs warmed IPL final, local cache with load shedding, and replica failover.7 guided stepsUnlock →
  6. 06 Cohort onlyHot KeysA viral celebrity key overloads one Redis Cluster node (real CRC16 slots), a new node does not help, then a local L1 cache, key copies across slots, the hash-tag mistake and a CDN for the profile photo.8 guided stepsUnlock →
  7. 07 Cohort onlyBloom FilterAdd and check names on a 32-bit array with real hashes, find a false positive, see why delete causes a false negative, switch to a counting filter, and measure how k and m change the error rate.13 guided stepsUnlock →
  8. 08 Cohort onlyRedis SentinelA client asks Sentinel for the master, PING health checks turn SDOWN into ODOWN only at quorum, two Sentinels race for one epoch's votes, the replica with the highest offset is promoted, plus quorum vs majority and split brain.15 guided stepsUnlock →
  9. 09 Cohort onlyRedis ClusterCRC16 to a hash slot, -MOVED and hash tags, adding node D with a rebalance and -ASK, then a master failure: replication offsets, PFAIL, gossip, majority FAIL, an epoch election and the old master stepping down.12 guided stepsUnlock →
  10. 10 Cohort onlyRate LimiterFive algorithms on one request timeline: Fixed Window and its boundary burst, Sliding Log, Sliding Counter, Token Bucket and Leaky Bucket. Then local counters, the GET + SET race, atomic INCR and a Lua script.12 guided stepsUnlock →

Class 09 — Week 05

Messaging & Asynchronous Processing

  1. 01 Cohort onlyKafka Consumer GroupsOrder keys hash into three partitions, consumers join until one sits idle, offsets commit to __consumer_offsets, a second group reads at its own pace, and a crash before commit causes a rebalance and a duplicate.13 guided stepsUnlock →
  2. 02 Cohort onlyKafka ReplicationThree brokers with leader and follower copies: a slow follower leaves the ISR and the high watermark moves, acks=1 loses an acknowledged write while acks=all does not, min.insync.replicas rejects writes, then leader election and an unclean election.12 guided stepsUnlock →
  3. 03 Cohort onlyKafka Delivery SemanticsOne ₹5,000 order and a crash at the worst moment: commit-first loses it, process-first charges twice, an inbox and an idempotent producer stop duplicates, a Kafka transaction commits once, and an idempotency key protects the payment gateway.11 guided stepsUnlock →
  4. 04 Cohort onlyKafka RetryA payment gateway goes down: a 503 is retried but a bad request is not, retrying at once causes a storm, backoff and jitter let it recover, then blocking retry vs retry topics and a retry limit that ends in the DLQ.7 guided stepsUnlock →

Class 10 onwards

More simulators for cohort students

  1. Class 10Microservices Design Patterns Cohort only
  2. Class 11CQRS + Saga + Distributed Transactions Cohort only
  3. Class 12Concurrency Control Cohort only
  4. Class 13Idempotency + Distributed Counters + Failure Handling Cohort only
  5. Class 14WhatsApp + Notification + Monitoring Cohort only
  6. Class 15Twitter / Instagram + YouTube Cohort only
  7. Class 16Uber + Location-Based Systems + Distributed Scheduler Cohort only
  8. Bonus weekTinder Feed + Distributed Message Queue Cohort only