System scale simulator

Set the scene (tables, data, existing traffic), drop in real services, wire up the flows, then load and break it. Goals turn any scenario into a challenge.

The system

under 60% busy60–85%85–100%overloaded or downDrag the background to pan, Ctrl + scroll to zoom, Delete removes the selected box.

    Endpoints

    Endpointreq/sp50p99errors

    10‑minute run

    worst endpoint p99 (log scale)errorsqueue backlogload multiplierevent windows
    0:00

    What to notice

      Query plan

      Schema for this database

      Data size vs memory

      Each database's tables and indexes against the memory it can cache, and each Redis cache's need against what it has

      Latency as load grows

      Worst endpoint p99 with no failures, scaling every endpoint and table together

      Monthly cost

      Approximate on-demand list prices, us-east-1, at average load. Check AWS pricing before quoting.

      ComponentSized as$/month

      Pricing pages: RDS · ElastiCache · SQS · Kinesis · Fargate · ALB · CloudFront

      How the model works

      Row and index sizes follow Postgres's on-disk layout: 8 KB pages, a 24‑byte tuple header, 4‑byte line pointers, column alignment, B‑tree leaves 90% full and deduplication for repeated values. For each read the planner compares a sequential scan, an index scan and (for count) an index-only scan with Postgres's default costs and picks the cheapest. Updates are HOT (no index writes) most of the time when the table's fillfactor leaves free space. Existing table traffic is modelled as primary-key reads and inserts.

      A page read from memory costs about 2 µs; from disk it costs the storage latency (gp3 about 1 ms, io2 0.4 ms, local NVMe 0.1 ms). Each database caches in 75% of its RAM, shared by all its tables, with 90% of reads going to the hot share of rows. A statement costs about 60 µs of CPU, a scanned row 40 ns, and the network round trip 0.3 ms. Publishing to SQS takes about 8 ms (p99 25 ms) and to Kinesis about 10 ms.

      Under load every component is a set of servers: service vCPUs, database vCPUs, IOPS and pool connections, Redis about 120k operations per second per shard. Waiting uses the M/M/c approximation, p99 assumes exponential tails, steps in an endpoint add up, and demand beyond capacity becomes errors. A failed Postgres primary is replaced by its Multi‑AZ standby after the failover time, with a cold buffer cache; losing an availability zone takes a third of every service's tasks and fails over every database primary and Redis shard at once. These are teaching estimates for comparing designs and finding bottlenecks; load‑test before promising anything.