# ScalingSutra > ScalingSutra is a free, browser-based interactive system design visualizer. It teaches distributed systems and backend architecture through real-time animated simulations — no sign-up required. Each sandbox module lets engineers manipulate live parameters (RPS, TTL, node health, replication lag) and observe how systems respond, making abstract concepts tangible. ScalingSutra is used by software engineers preparing for system design interviews at FAANG/MAANG companies, senior engineers deepening distributed systems knowledge, and CS students learning backend architecture. All 20 sandbox modules are free and run entirely in the browser. ## Sandbox Modules ### Core Fundamentals - [API Gateway Edge](https://www.scalingsutra.com/#gateway): Simulate reverse proxy routing, token bucket rate limiting, weighted round-robin and least-connections load balancing, and a Circuit Breaker state machine. Adjust RPS, toggle auth, and crash backend servers to observe failover. - [CDN Cache Revalidation](https://www.scalingsutra.com/#cdn): Visualise regional PoP edge caching, TTL expiry, Stale-While-Revalidate (SWR) protocol, wildcard purge operations, and cache hit/miss latency differentials. - [DB Sharding & Replication](https://www.scalingsutra.com/#sharding): Distribute rows across shards using Range or Hash key routing. Observe replication lag between primary and replica, and trigger eventual consistency stale-read anomalies. - [Google Autocomplete Trie](https://www.scalingsutra.com/#autocomplete): Watch a Trie prefix tree illuminate on each keystroke. Consistent hashing routes prefix queries to distributed Trie shards. A MapReduce pipeline recomputes query frequency weights nightly. ### Distributed Consensus & Storage - [Raft Distributed Consensus](https://www.scalingsutra.com/#raft): Visualise leader election timeouts, log replication to followers, quorum majority commits, and split-brain scenarios from network partitions in a 5-node cluster. - [Apache Kafka Topics](https://www.scalingsutra.com/#kafka): Simulate key-hash vs round-robin message partitioning, consumer group rebalancing on member joins/leaves, offset commit mechanics, and idle partition threads. - [GFS Chunk Replication](https://www.scalingsutra.com/#gfs-replication): Upload files split into 64 MB chunks. Apply Rack Awareness placement rules. Crash individual chunk servers or entire racks and watch the GFS Master trigger self-healing re-replication. ### Real-time & Streaming - [ABR Livestreaming](https://www.scalingsutra.com/#livestream): Simulate RTMP ingest, HLS segment chunking, playback buffer stalls, and adaptive bitrate (ABR) quality switching as viewer bandwidth degrades. - [WebSockets Server Pools](https://www.scalingsutra.com/#websockets): Observe bi-directional persistent socket connections, horizontal server pool scaling, and Redis Pub/Sub backplane fan-out synchronisation across server instances. - [Uber Geospatial Surge](https://www.scalingsutra.com/#ubersurge): A stadium empties — 10,000 riders flood the H3 hexagonal geo-index. Supply/demand imbalance drives surge multipliers up to 4.5x. Drivers are matched via k-ring neighbor hex expansion. - [Battle Royale Matchmaker](https://www.scalingsutra.com/#matchmaker): Queue 50K players through MMR skill and latency buckets. Watch 100-player lobbies assemble, and observe Kubernetes HPA auto-scale Agones game server pods as demand spikes. ### Transactions & Reliability - [Distributed Transactions](https://www.scalingsutra.com/#transactions): Compare 2-Phase Commit (2PC) coordinator-cohort locking with Saga choreography-based compensating transactions across distributed microservices. - [5M Pizza Flash Sale](https://www.scalingsutra.com/#pizzasale): Simulate 5 million concurrent orders hitting limited stock. Toggle Redis pre-allocation fast-fail. Compare Optimistic (OCC) vs Pessimistic (PCC) database locking and observe deadlock/starvation rates. - [Ticketmaster Seat Sale](https://www.scalingsutra.com/#ticketmaster): 100K fans compete for 500 concert seats. Redis TTL locks expire abandoned carts. A virtual waiting room throttles demand. A Cron worker reclaims expired locks back to the pool. - [Robinhood Trading Engine](https://www.scalingsutra.com/#robinhood): Route a GameStop-level trading surge through an LMAX Disruptor ring buffer matching engine. Bid-Ask pairs commit to a double-entry ledger via 2PC across sharded databases. - [Disaster Recovery & Failover](https://www.scalingsutra.com/#dr): Trigger a full cloud region failure. DNS health checks detect the outage and initiate failover. Track RTO (recovery time objective) and RPO (data loss) from async replication lag. Promote standby read-replicas. ### Advanced Patterns - [E2E System Topology](https://www.scalingsutra.com/#topology): Trace a request end-to-end: Client → CDN cache check → API Gateway / Load Balancer → User and Order microservices → Sharded DB. Toggle circuit breakers and observe cascade failure propagation. - [Rate Limiters Compare](https://www.scalingsutra.com/#ratelimit-compare): Run Token Bucket, Leaky Bucket, Fixed Window Counter, and Sliding Window Log algorithms side-by-side under identical traffic bursts. Compare allowed/blocked rates and latency profiles. - [Twitter Snowflake IDs](https://www.scalingsutra.com/#snowflake): Generate 64-bit globally unique time-sortable IDs across distributed worker nodes. Inspect bit-field decomposition (timestamp / worker ID / sequence). Simulate NTP clock drift to trigger clock-skew conflicts. - [Cache Stampede & Mutex](https://www.scalingsutra.com/#cache-stampede): Evict a hot cache key under heavy concurrency and watch the thundering herd spike database load. Enable Single-Flight (singleflight) mutex coalescing to collapse duplicate in-flight requests. Compare LRU, LFU, and FIFO eviction policies. ## Blog Articles - [API Gateway Circuit Breaker](https://www.scalingsutra.com/#blog): How stateful health checks protect downstream services from cascading failure under spike load. - [Raft Consensus Explained](https://www.scalingsutra.com/#blog): Step-by-step walkthrough of leader election, log replication, and split-brain recovery in the Raft algorithm. - [DB Sharding Strategies](https://www.scalingsutra.com/#blog): Range vs hash vs directory-based sharding — trade-offs, hotspot risks, and resharding strategies. - [Kafka Consumer Groups](https://www.scalingsutra.com/#blog): How Kafka assigns partitions to consumers, handles rebalancing, and manages offset commits. - [Distributed Transactions & Saga Pattern](https://www.scalingsutra.com/#blog): When 2PC is too slow — using Saga choreography and compensating transactions for eventual consistency. - [WebSockets at Scale](https://www.scalingsutra.com/#blog): Architecting millions of persistent connections with sticky sessions, Redis Pub/Sub backplanes, and horizontal scaling. - [CDN Cache Revalidation](https://www.scalingsutra.com/#blog): TTL expiry, stale-while-revalidate, and cache purge strategies for global edge networks. - [Adaptive Bitrate Streaming](https://www.scalingsutra.com/#blog): How HLS and DASH dynamically switch video quality segments based on buffer health and bandwidth estimation. - [CAP Theorem Deep Dive](https://www.scalingsutra.com/#blog): Consistency, Availability, and Partition tolerance trade-offs with real-world database examples. - [Designing for 10M Users](https://www.scalingsutra.com/#blog): Progressive scaling playbook from single server to multi-region distributed architecture. - [Disaster Recovery & Failover](https://www.scalingsutra.com/#blog): Active-passive vs active-active failover, RTO/RPO objectives, and DNS-based health-check routing. - [Rate Limiting Algorithms](https://www.scalingsutra.com/#blog): Token Bucket, Leaky Bucket, Fixed Window, and Sliding Window Log — implementation and trade-offs. - [Twitter Snowflake ID Generation](https://www.scalingsutra.com/#blog): Generating 64-bit monotonic unique IDs at scale without a central coordinator. - [GFS Chunk Replication](https://www.scalingsutra.com/#blog): How Google File System uses rack-aware placement and master-coordinated re-replication for durability. - [Cache Stampede Mitigation](https://www.scalingsutra.com/#blog): Thundering herd problem, probabilistic early expiry, and singleflight mutex coalescing patterns. ## About ScalingSutra covers system design topics relevant to software engineering interviews and production architecture: API design, caching strategies, message queues, consensus algorithms, database internals, distributed transactions, real-time systems, and reliability engineering. All simulations run client-side in the browser with no backend. The site is free with no account required.