Labs

Systems you can touch: change one thing and watch what moves. Everything runs in your browser.

Back-of-the-envelope calculatorUsers and actions in; QPS, storage and bandwidth out. The first five minutes of every design round.Back-of-the-envelope estimation · The GenAI system design framework · Design: URL shortenerLatency ladderFrom L1 cache to a round trip across the Atlantic, on a scale you can feel.Back-of-the-envelope estimation · Caching strategies · CDNs and edge cachingLoops in motionWatch five classic loops run step by step: each step is a square, and the shape they draw is the Big-O.Big-O and complexity analysis · Two pointers · Binary search and search on the answerBig-O growthMove n and watch O(n²) blow past a one-second budget while O(n log n) barely moves.Big-O and complexity analysis · Binary search and search on the answer · Dynamic ProgrammingSliding window, step by stepStep the two pointers through a string and see why each character enters and leaves once.Sliding window · Two pointers · Hash maps, sets and prefix sumsConsistent hashing ringAdd a node and count the keys that move, with and without virtual nodes, against hash mod N.Consistent hashing · Partitioning & sharding · Design: distributed key-value storeRate limiter playgroundFire bursts at a token bucket, a fixed window and a sliding window, and see which requests get a 429.Rate limiting · LLM gatewayQuorums: N, R, WPick N, R and W, fail some replicas, and see when a read is guaranteed to see the last write.Replication · Consistency models · Design: distributed key-value storeGPU memory: weights + KV cachePick a model, precision, context and batch, and see what fits in one 80 GB GPU.GPU memory math · KV cache · PagedAttention & vLLMSampling playgroundTurn temperature, top-k and top-p and watch the next-token distribution reshape.Decoding & sampling (temperature, top-p) · Hallucinations: why they happenCache hit ratioSkew the traffic, size an LRU cache and add a TTL: watch the hit ratio, the average latency and the origin load move.Caching strategies · CDNs and edge caching · Design: news feedUtilization vs latencyPush arrivals toward capacity and watch time in the system bend up long before throughput runs out.Queues vs streams (Kafka) · Load balancing · SLIs, SLOs & error budgetsBloom filter calculatorPick items and a false-positive target, get bits and hashes, then overfill a toy filter and catch its false positives.Probabilistic data structures · Design: web crawler