StackMonkey Icon StackMonkey

Drag boxes. Watch the system break. Understand why.

You can draw a system on a whiteboard and it will look perfect. Then real traffic shows up and the database falls over. StackMonkey is where you find that out first. Drop in your boxes, crank up the load, and see what breaks.


verified Engine verified against M/M/c/K, M/G/1 PK, Little’s Law, and closed queue models
L = λW W_q = λE[S²]/2(1-ρ) P_b = ErlangB(c, A)
STEP: 10ms · TICK #142,804
Throughput: 14,200 req/s
p95 Latency: 34.2 ms
Success Rate: 99.82%
Dropped Calls: 0/s
Open Traffic
Client Pool
Rate: 14.0k/s
Token Bucket
API Gateway
Limit: 15.0k/s
16 Workers (Go)
App Service
Saturation: 42%
Read-Through
Redis Cache
Hit Ratio: 94.2%
4 Cores (100 pool)
Postgres DB
Conn Pool: 28 / 100
Simulate Chaos:
DISCRETE EVENT DISPATCHER LOG Deterministic seed #8192 · CLOCK: 14:28:04
14:28:02 [Gateway] token_bucket refill 15000/s (leaky bucket capacity 25000)
14:28:03 [Redis] hit_ratio 0.94, avg_latency 0.8ms, eviction policy: allkeys-lru
14:28:04 [Service] 16 workers active, 42% pool saturation, mean run time 18.4ms
Queues look boring on paper.
They are why systems fall over under load.
Starting designs

10 Designs to Start From

Ten classic system design problems, each sized for a stated load. Open one, push it past its limit, and see which box gives out first. Each one also says what it leaves out.

100M links/mo link

URL Shortener

Redirects check a cache first and only misses reach the database. New links take a separate path, so a flood of them cannot slow redirects. About 20,000 requests a second at peak.

Redis · PostgreSQL
50k users forum

Chat Service

50,000 people keep a WebSocket open and send messages through Kafka into a Cassandra history store. Stop a chat server and watch everyone reconnect at once.

WebSocket · Kafka · Cassandra
Fan-out on write dynamic_feed

News Feed

A new post goes through Kafka to a worker that fills the timeline cache, so reading a feed is one lookup. Slow the worker down and feeds go stale while reads stay fast.

Kafka · Timeline cache
CDN + S3 play_circle

Video Streaming

Viewers fetch video segments from a CDN that answers 96 percent of them from the edge. Purge the CDN and watch the origin take everything, or surge the uploads and watch the transcode queue.

CDN · S3 · SQS
Chunked uploads cloud_upload

File Storage & Sync

A Dropbox style service: 4 MB chunks in S3, a metadata database behind a cache, and a queue that tells your other devices. Pause S3 or the database and see which parts keep working.

S3 · Metadata DB · Queue
Safe over fast credit_card

Payment System

Every payment is written to a primary database with a synchronous replica, so no accepted payment is lost. Stop the primary and watch the failover. A slow merchant backs up webhooks without delaying payments.

Postgres · Kafka · Webhooks
Token bucket speed

API Rate Limiter

One customer sends 6,000 requests a second against a 3,000 limit. The gateway turns the extra away with 429s and the services behind it never see them. Switch the limit off to see the same flood unprotected.

Gateway · Redis
Push and email notifications

Notification System

Services send 5,000 notifications a second into a push queue and an email queue. Slow the push provider and only the push queue grows. Email and the callers carry on.

Queues · Redis · Postgres
Frontier queue travel_explore

Web Crawler

Fetchers spend their time waiting on other people's servers, so they need many workers, not many cores. Cut the fetchers and the backlog grows. Lose the seen URL filter and the queue fills with repeats.

SQS · Redis · Cassandra
Write heavy locations near_me

Ride Sharing

40,000 drivers send their location every few seconds, kept in Redis and never in the trip database. Riders look up nearby drivers and ask for rides. Kill the location store and riders cannot be matched, but ride requests still go through.

Redis · Postgres · Kafka
Things you can break

Watch These Break Under Load

Each of these is a built in design. Stop the box, slow it down or press the spike button, and watch what the rest of the system does about it.

Scenario 01 Template: Retry storm and circuit breaker

The Retry Storm

A checkout service calls a slow inventory service with a 150 ms timeout and three retries. During a ten-second traffic spike, retries bury the inventory service. Without a circuit breaker, it never recovers.

Success before spike about 100%
→
Without breaker, after 0%
Scenario 02 Template: URL Shortener

The Cache Goes Down

Redis stops. Redirects keep working because the service falls back to the database, but the database now takes every read. It gets much busier and a little slower. At double the traffic it would not survive.

Database CPU 5%
→
Redis stopped 61%
Scenario 03 Template: Notification System

A Slow Provider

The push provider starts taking three seconds to answer. Only the push queue backs up, with thousands of waiting messages. Email keeps flowing, and the services sending notifications never notice.

Push queue 808 waiting
→
Provider slow 12,503 waiting
Scenario 04 Template: Video Streaming

The Cold CDN

Someone purges the CDN. Until it refills, nearly every viewer request goes to the origin instead of the edge. The origin goes from comfortable to flat out, and it is the next box to fail.

Origin busy 12%
→
After the purge 100%
Automated Mathematical Verification

How We Check the Numbers

The queue part of the engine is tested against textbook formulas. Each test runs the same situation in the simulator and in the math, and checks that the answers match.

See the full validation arrow_forward
M/M/1 & M/M/c
Multi-Server Erlang-C

Average wait times match the textbook formula for one worker and for many workers, from a nearly idle system to a nearly full one.

Matches the formula
M/M/1/K
Finite Capacity Drop

When the waiting room is full, new requests are turned away. The share turned away matches the formula.

Matches the formula
L = λW
Little’s Law Invariance

The average number of requests inside the system equals how fast they arrive times how long each one stays. It is a good check that worker counts add up.

Counts add up
M/G/1 P-K Formula
Pollaczek-Khinchine

Waiting time when response times vary: a few slow calls hurt even when the average looks fine. Checked for fixed, exponential and long tailed response times.

Matches the formula
info
What it does not check

The checks cover the queueing part of the engine. StackMonkey does not run your code, and it does not know your real hardware or network. It shows how a design behaves when workers, queues and connections run out, with numbers you set yourself.

Intended Audience

Who It Is For

terminal

Architects and Senior Engineers

Put a running design next to your proposal instead of a diagram. Find out roughly where it runs out of workers or connections before you pay for the machines.

  • ✓ Back up a design with numbers
  • ✓ Find the box that fails first
shield

Platform and SRE Teams

Try timeouts, retries and circuit breakers on a model before you change them in production. See how one slow service drags down the ones that call it.

  • ✓ Try timeouts, retries and circuit breakers
  • ✓ Watch queues build when a box slows down
lan

Students and Interview Prep

Build the classic designs, push them until they break, then try a fix and see if it helped. The formulas from your course show up on real numbers, so they stop being abstract.

  • ✓ Same design, same result every time
  • ✓ Checked against textbook queueing formulas
Answers

Frequently Asked Questions

play_arrow

Find out what breaks first.

Build a design, stop boxes mid run and push the load up. Free to use, and you only need a Google sign in to save, export, or take design challenges.

Free to use · No sign in to try it · No credit card