serversim
LearnSimulatorTemplatesPricing
…
…
Open menu
Learn↗Simulator↗Templates↗Pricing↗
My DocumentsDocs
Foundations contents/7 / 85min

Two hundred windows — why are only ten working?

The trapYou opened two hundred places to take a request — so why did throughput not rise to match?

Move it yourself

0/96 stepSpeedstampscall (ms)
0.0sdone0123456×200stamps 0/2queue 0
servingon the phoneat the vaultfree

0.0s · queue 0 · serving 0 · done 0 — nobody has arrived yet

Follow the sentences

1/48

Two hundred counters are open. Why do only ten of them work?

Text mode advances to the next sentence every 3 seconds.

Picture it this way

This bank has two hundred windows — in this chapter a window is one place that takes a request, which is a thread. The picture above draws six of them; the ×200 badge stands for the rest. But there are only two stamps for the paperwork.

A window without a stamp cannot call anyone up. So four of the six windows on screen stay empty, waiting for a stamp to come back, while the line grows — from outside it looks like plenty of staff and a queue that will not move. The picture keeps those customers in the line; on a real server the request is already holding a thread while it waits for a connection.

Raise the stamps from 2 to 6 above. Not one window was added, and the line all but disappears. What went up was not the number of windows but the number of jobs that can be started at once.

Now switch the call on. While a teller holds the receiver, that window cannot take the next customer — and the line grows again even though there are six stamps — each one stays in the hand of a customer who is still on the phone.

Now the numbers

measured · computed just now

Now the same bank at production scale — more customers and more stamps than the picture: 200 windows, 200 milliseconds of work per job, 10 stamps, and 300 customers arriving every second. Only 50.0 customers a second actually finished and left; the other 250 a second piled into the line.

That number is not an accident. One stamp sends 5 customers a second on their way, so 10 stamps cap the bank at 50 customers a second — and the throughput measured above is exactly that ceiling. It stays true whether the bank has 200 windows or two thousand. Raise the stamps to 50 and the ceiling becomes 250 a second, measured at 250: exactly 5 times more.

Give the bank one stamp per window (200) and the ceiling goes to 1,000 customers a second, so nobody piles up in the line any more: 300 customers a second come in and 299 a second go out, with the windows busy only 29.9% of the time. Stamps are no longer the bottleneck.

Now let each teller hold one phone call for 560 milliseconds. The time a customer occupies a window goes from 200 to 760 milliseconds and the ceiling drops to 263 customers a second — lower by a factor of 3.8, with the stamp count still at 200. The stamps are not idle either: customers on the phone hold them while they wait, so stamp utilization is 99.8%. What sets throughput now is not how many stamps there are but how long each one is held. Even if the local work took no time at all, 200 windows ÷ a 560 ms call = 357 a second is the hard ceiling.

These numbers are not written into the sentence. They come from a simulation run while this page rendered.

Try it in the simulator

  1. 1.Open the 'HikariCP pool exhaustion' preset at its defaults — 200 places to take a request (Tomcat threads.max) but only 5 database connections (HikariCP pool). The KPI panel's Success reads just 2.4%.
  2. 2.Raise HikariCP pool to 50 in the inspector and Success stays at 2.4% — the narrow spot has moved further back, to the disk. Widen one narrow spot and the next one appears.
  • Open "external dependency, partial failure" from the preset list too — 500 RPS × a 0.56 s hold needs 280 requests in flight, but Tomcat has only 200 threads, and the success rate falls to 50.3%. That is this chapter's phone call, in the simulator.
  • "Circuit breaker — cutting the cascade" hangs that call up early. With the breaker on, all 5,077 internal API requests get through and p50 goes from 243 ms to 60 ms — while total success drops from 60.9% to 51.7%. That is the price of protecting the scarce seats.
Open it in the simulator →

In one sentence

How much can happen at once is set by the scarcest resource, not the number of seats — and anything that holds a seat longer (an external call) lowers that number too.

Progress is stored in this browser only (no account, no sync between devices).

Quick check

0 / 3 correct
  1. 1.With 200 seats and 10 stamps, how do you raise throughput?

  2. 2.One stamp per window, and throughput still stops at 263 customers a second. Why?

  3. 3.When an external API slows down, what runs out first on your server?

New words here

connection pool
A small set of ready-made paths to the database, handed out and returned. The stamps in our analogy — their number is how many requests can use the database at once.
external call
Your server asking another service (payments, auth, a maps API) and waiting for the answer. The phone call in our analogy: it holds the seat while it waits.
bottleneck
The narrowest spot, the one that sets the overall pace. Widen it and the next-narrowest spot becomes the bottleneck.

Previous

Why does a busy server fall behind?

Next

When does an event loop win, and when does it lose?

serversim

Learn why servers slow down and fail, then reproduce the same mechanism in a simulator.

© 2025-2026 serversim · Architecture simulation tool

Product

  • Learn
  • Simulator
  • Templates
  • Pricing

Resources

  • Docs
  • Benchmarks
  • Blog

Legal

  • Privacy
  • Terms
  • Refund