INTERACTIVE LABS

Interactive System Design Playground

Architecture is learned by observing system behavior under stress. Interact with these 8 deterministic simulators to develop genuine intuition for network latency, cache evictions, consistent hashing, rate limiting, and capacity sizing.

SIMULATOR

HTTP Request, Timeout & Retry Simulator

Simulate network latency, backend processing delays, timeout boundaries, and retries. Observe how naive retries amplify system strain when a server is already degrading.

End-to-End Latency 160 ms
Outcome 200 OK
Backend Work Multiplier 1.0x
Request Execution Trace:
Attempt 1 Network RTT (40ms) + Server (120ms) = 160ms (within 200ms timeout) → SUCCESS
SIMULATOR

Cache Topology, Eviction & Hit-Rate Simulator

Tune cache capacity, eviction strategy (LRU vs LFU), and traffic access distributions (Zipfian 80/20 vs Uniform). See how cache hit rate directly protects database throughput.

Cache Hit Rate 88.4%
DB Load (Offloaded) 1,160 QPS
Memory Footprint 1.8 MB
Hits: 8,840 Misses: 1,160
💡 Architectural Takeaway:

Under real-world Zipfian traffic (where 20% of items generate 80% of reads), an in-memory cache holding just 1,000 keys deflects nearly 90% of requests away from relational disk tables.

SIMULATOR

Consistent Hashing Ring & Rebalancing Simulator

Explore the circular hash ring ($0$ to $2^32-1$). See how Virtual Nodes (vnodes) prevent severe hash skew, and how adding or removing a database node only re-maps $K/n$ keys instead of flushing the entire cluster.

HASH RING 2^32 - 1
Key Distribution Across Nodes:
SIMULATOR

Rate Limiting Algorithm & Throttling Playground

Compare how Token Bucket, Fixed Window, Sliding Window Log, and Leaky Bucket handle sudden traffic bursts. Discover why Fixed Window permits $2\times$ boundary spikes and how Token Bucket accommodates temporary bursts without starvation.

Requests Allowed 10
Throttled (429) 6
Memory Complexity O(1)
Evaluation Stream (Quota: 10 req / sec):
Algorithm Mechanics:

Token Bucket has 10 initial tokens. 10 requests consume all tokens immediately and succeed. The remaining 6 requests are rejected with HTTP 429 until the bucket refills at 10 tokens/sec.

SIMULATOR

Message Queue Lag & Backpressure Simulator

Tune producer publish rates against consumer group processing capacity. Observe how consumer lag accumulates, when queue buffers overflow into Dead-Letter Queues (DLQ), and how upstream backpressure protects asynchronous pipelines from catastrophic memory exhaustion.

Total Consumer Drain 600 msg/sec
Queue Delta +200 msg/s
System State Lagging
Buffer Utilization: 1,250 / 2,000 msgs 62.5%
Pipeline Dynamics:

Producers generate 800 msg/sec while 3 workers process 600 msg/sec. The queue accumulates 200 msg/sec of consumer lag. To stabilize, scale to at least 4 consumer pods or throttle upstream intake.

SIMULATOR

LRU Cache: Doubly-Linked List & Hash Map Playground

Interactive visualization of how an LRU Cache achieves guaranteed $O(1)$ key lookup and $O(1)$ node promotion. Click keys below to trigger cache reads and watch node pointers splice in real time.

Click a Key to get(key):
Doubly Linked List (Capacity: 4 Nodes) Ready
HEAD
Most Recent
TAIL
Eviction Target
Step-by-Step O(1) Pointer Splicing Log:

Cache initialized with 4 warm nodes. Click any key above to inspect pointer updates.

SIMULATOR

Capacity, Bandwidth & Little's Law Infrastructure Sizing

Derive infrastructure requirements from user metrics. Calculate Read/Write QPS, 5-year persistent storage, bandwidth throughput, memory caching footprint, and minimum application server instances via Little's Law ($L = \lambda \times W$).

Peak Read QPS (2.5x) 11,574 QPS
Peak Write QPS (2.5x) 1,157 QPS
5-Year Storage (3x Rep) 438 TB
Network Egress Bandwidth 740.7 Mbps
20% Daily Read Cache (RAM) 160 GB RAM
App Server Instances Needed (Little's Law) 12 Pods (50ms avg latency)
📐 Little's Law Formula Applied: L = λ × W → Concurrency = 11,574 req/sec × 0.050 sec = ~579 concurrent in-flight requests. At 50 concurrent requests per pod → 12 server pods required.
SIMULATOR

Architecture Trade-Off & PACELC Decision Matrix

Reasoning Engine

Architecture is not about memorizing components—it is about balancing trade-offs under real-world constraints. Pick a scenario below, select an architecture strategy, and evaluate its impact across Consistency, Latency, Availability, and Cost.

Architectural Impact Scorecard:
Consistency (Data Correctness) High
Latency (Response Speed) Sub-20ms
Availability (Uptime during Partition) 99.99%
Complexity & Infrastructure Cost Moderate
Architectural Evaluation: