Contents/ Part IX · Probability & Distributions Case Studies/ Chapter 51

Server Traffic Spikes: the Poisson

Requests hit a server one after another, at a steady average rate. The count of requests per second is the Poisson distribution, the model for rare events in a fixed window. From 1,000 seconds of traffic we fit the rate, confirm its signature, and size the risk of a load-breaching spike.

⏱️ ~12 min read
🐍 Notebook included
📊 Chapter 51

The binomial counts successes in a fixed number of trials. But what if there is no fixed n, just events trickling in over time, like requests hitting a server? When events are many but each is unlikely in any instant, the count follows the Poisson distribution.

λ
The Poisson counts events in a fixed interval occurring at average rate λ. Its PMF is λke−λ/k!, and its signature is mean = variance = λ, a single parameter for both center and spread.
🖥️
The dataset

it_server_traffic.csv logs requests_per_second over 1,000 seconds. We model the per-second count as Poisson and ask: what is the rate, does it show the Poisson signature, and how often does load breach a capacity threshold?

1

Fit λ, Check the Signature

The rate is just the average count: λ ≈ 12 requests per second. The Poisson's fingerprint is that the variance equals the mean, and here the variance is 11.69 against a mean of 12.01, a ratio of 0.97. That near-equality is strong evidence the Poisson is the right model.

Requests per second: Poisson(λ ≈ 12) tracks the data λ = mean = variance ≈ 12 requests per second →

One number, λ ≈ 12, fixes the entire distribution: its center, its spread, and every probability. That is the economy of the Poisson, and the reason it is the default model for counts of independent arrivals.

2

The Spike Risk

Capacity planning is a tail question. If the server degrades above 20 requests per second, the breach probability is the complementary CDF, P(X > 20), read straight off the Poisson.

ThresholdP(X > threshold) Poissonobserved
> 15 req/s0.1560.151
> 18 req/s0.0380.030
> 20 req/s0.0120.016
> 22 req/s0.0030.005

A breach above 20 requests per second happens about 1.2% of the time under the Poisson, close to the 1.6% seen in the data. The 99th-percentile load is about 21 requests per second, the number to provision against. Sizing capacity to the average (12) would leave the system underwater on the worst 1% of seconds; the tail is what matters.

3

Why Poisson? Many Chances, Each Rare

The Poisson is the limit of a binomial with a huge number of trials and a tiny success probability, holding np = λ fixed. That is exactly the structure of web traffic: a vast pool of users, each unlikely to hit the server in any given second.

🔬
The binomial becomes Poisson

In the notebook, a Binomial(100,000, λ/100,000), 100,000 users each with a one-in-eight-thousand per-second chance, is indistinguishable from Poisson(λ), differing by less than a millionth. "Many independent chances, each rare" always collapses to a single rate λ that serves as both the mean and the variance.

🐍

Run the traffic analysis

The companion notebook fits λ, confirms the mean-equals-variance signature, overlays the Poisson on the observed counts, validates the fit with a chi-square goodness-of-fit test, tabulates the spike-breach tail probabilities and percentiles, and demonstrates the binomial-to-Poisson limit, every number from code.

📓 View Notebook (code & outputs) ▶ Open in Colab ⬇ View / Download on GitHub

View opens the rendered notebook instantly (no setup). Open in Colab runs & edits it live in your browser. To run locally, install numpy, pandas, scipy, and matplotlib and launch jupyter notebook.

🎓 Key Takeaways

  • Counts of arrivals per interval are Poisson: PMF λke−λ/k!, with a single rate λ.
  • The signature is mean = variance = λ; here both are about 12 (ratio 0.97), confirming the model.
  • Capacity is a tail question: P(X > 20) ≈ 1.2% and the 99th-percentile load is about 21 req/s.
  • The Poisson is the binomial limit (large n, small p, np = λ): many chances, each rare.
  • Provision to the tail, not the mean, or the worst 1% of seconds breaches capacity.
4

Quiz: Test Yourself

Eight quick questions on the Poisson case study. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved, so you can hop back to the chapter and return anytime.