← Back to Insights
Interactive model · Systems Integration

File Storm Simulator

A retailer asks for something that sounds routine: collect the files from its POS devices every night. This is an educational walk-through of how an architect turns that request into a solution. The scale is unknown, so we uncover and classify the requirements, then model devices and files in symbols using the mathematics of queues. We compare options in the same symbols, turn the model into a decision rule, and only then draw the architecture. At the end you can run the model yourself.

23 November 2026 Architecture method · Queueing theory · Monte Carlo Runs in your browser
Part 1 · The request

“Collect the files from our devices”

A retailer asks for something that sounds routine:

“Every night, collect the files from our POS devices and deliver them to our collection point.”

That is the whole brief. It is tempting to answer straight away with a product, a diagram or an upload script. An architect resists that. A request names a need, not a design. And at this point we don't even know the scale: the estate could be fifty stores or fifty thousand.

So we won't size anything yet. We will build a model, a description of devices and files in symbols, that gives the right answer at any scale. The numbers can be plugged in later, once they are known. This piece follows the method one step at a time:

  1. Uncover the requirements. Ask questions until the request becomes needs, limits and unknowns.
  2. Model devices and files. Name the things in the problem, give every unknown a symbol, and derive what any solution will have to carry.
  3. Test the model. Know where it holds and where it doesn't.
  4. Generate options. Express each shape of solution in the same symbols, and compare them.
  5. Decide. Turn the model into a decision rule, and draw the architecture only once the rule has chosen.
Part 2 · Requirements

Turning the request into requirements

The first conversations are questions. Which files? From which devices? When do they exist? Where must they end up, and by when? What are we not allowed to change? The answers fall into four classes that every architecture framework recognises.

Functional requirements: what it must do

Non-functional requirements: how well it must do it

Constraints: what we don't get to choose

Unknowns: what we must find out

Look at what this has done. Nothing has been designed or drawn, and the scale is unknown. Yet we know any solution must respect a device budget, a time window, and four shared resources: the site uplink, the VPN hub, the inspection layer and the landing storage. And every unknown is a number we can give a symbol. That is where modelling starts.

Part 3 · The model

Modelling devices and files

Modelling means describing the problem so precisely that it can be calculated, without yet knowing the numbers. We do it in three steps: name the things, name the unknowns, and derive the quantities that matter.

Step 1: name the things

Strip the problem down and only five kinds of thing remain:

Step 2: give every unknown a symbol

SymbolWhat it isHow we'll find out
SNumber of sitesStore register
dDevices per siteAsset inventory or device management
fFiles per device per nightPOS application settings
sSize of one fileSample a week of files, and keep the largest sizes too
BSite uplink bandwidthNetwork team, measured after close
σSpread of start times around closeObserved, and later a design choice
qChance a single attempt failsTransfer logs, with 4G sites separate
CCapacity of the narrowest shared resourceVPN hub and inspection specifications, then a load test
TwThe window, from close to when files are neededFinance and operations

Step 3: derive what matters

From those symbols alone, we can write down every quantity a design must handle:

QuantityFormulaPlain meaning
Files per nightF = S · d · fHow much work there is to do
Volume per nightV = F · sHow many bytes must cross the path
Site drain timeτ = d · f · s / BHow long one site's uplink takes to send its files
Capacity floorC ≥ V / TwThe least capacity that could ever work, even if load were perfectly smooth
Peak arrivalsR ≈ N / (σ√2π)How fast senders start at the busiest moment (N senders)
Sites sending at onceL ≈ R · τLittle's law: arrival rate × time each spends
Peak bandwidth on the pathL · B ≈ S · τ · B / (σ√2π)What the VPN hub and inspection must carry at the peak
Finish time≈ 3σ + τWhen almost every site is done

That table is the model. It knows nothing about any particular retailer, and it works for any S, d, f, s or B. The six results below are the mathematics behind it: why these formulas, and why they can be trusted.

1. Many independent sources make a predictable stream

When many devices each send occasionally and independently, their combined arrivals behave like a Poisson process, whose rate is just the sum of the individual rates (the Palm–Khintchine theorem). You don't need to predict any single device to predict the estate. This is the branch of mathematics Agner Erlang founded in 1909 to size Copenhagen's telephone exchanges, and it is still used to size call centres, web servers and payment switches.

λestate = λ1 + λ2 + … + λNrates simply add

2. A shared clock turns the stream into a pulse

Files appear at close, so each source starts at the scheduled time plus a small random offset. If the offsets follow a bell curve with spread σ, the arrival rate takes the same shape, and its peak is:

Rpeak ≈ N · f / (σ √2π)N sources, f files each, spread σ

Two rules follow. The peak grows in step with the estate: double the sources, double the peak. The peak shrinks as the spread widens: double σ, halve the peak. The daily average doesn't appear at all, which is why sizing for the average fails.

3. Big estates are more predictable than small ones

The number of arrivals in any one second is random, with mean m and standard deviation √m. The noise relative to the signal is 1/√m, so the model becomes more accurate as the estate grows. Because the scale is unknown, this matters: the model is safe to use at any size, and most trustworthy at the largest.

Devices in one time zonePeak files per minutePeak files per secondSwing in the busiest second (1 s.d.)
1,0005329±34%
10,0005,31989±11%
200,000106,3831,773±2.4%
1,000,000531,9158,865±1.1%
10,000,0005,319,14988,652±0.3%

The table assumes f = 2 and σ = 1.5 minutes.

4. Queues punish high utilisation

Each shared resource has a service rate μ, and its utilisation is ρ = λ / μ. In the simplest queue model (M/M/1), the average number of requests waiting or in service is:

L = ρ / (1 − ρ)50% busy → 1 · 80% → 4 · 95% → 19

Little's law, L = λW, links the number in the system, the arrival rate and the time each spends there. It is how the model counts sites sending at once.

5. Retries are a feedback loop

If each attempt fails independently with probability q, and a device tries up to k times:

attempts per file = (1 − qk) / (1 − q)  ·  unsent = F · qk

Randomised retries add load gently. Retries that fire in lockstep recreate the pulse moments later (the “thundering herd”). And if failures rise with load, retries cause failures that cause retries: congestion collapse.

6. In a chain, the slowest link wins

Every file passes the same chain of shared resources. Throughput is capped by the link with the smallest capacity, and the time is the sum of the time at each link. That is why the model carries a single C, the narrowest link, and checks the peak against it.

throughput = min(μ1, …, μn)  ·  Wtotal = W1 + … + Wn

When the closed forms get tangled (several zones, retries layered on retries), we simulate every device and count. That is a Monte Carlo simulation, and it is what the simulator at the end of this page runs, with the formulas and the simulated results side by side.

Part 4 · Limits of the model

Where the model holds, and where it breaks

A model is only as good as its assumptions. Each failure below makes the real peak larger than the modelled one, so an architect checks them before trusting the numbers.

It holds when…It breaks when…What to do
Devices act independently once the schedule fires.A carrier or regional outage fails thousands of devices at once, and they all recover together.Model failures as shared events, and expect a second pulse at recovery.
The number of sources is large.The thing being sized is small, such as one site's uplink.Size small pieces from simulated percentiles, not the mean.
Failures don't depend on load.Timeouts rise as a link saturates, so q grows with ρ.Keep peak ρ well below 1, cap retries, and push back explicitly.
Files are similar in size.A few huge files dominate, and files grow on peak trading days.Use the largest observed s, not the average.
Start times really are random.Every device is scheduled for exactly 00:00, or a firmware rollout reboots them all together.Add a deliberate random offset. Never rely on accidental spread.
The schedule is fixed.Late trading before Christmas or 24-hour stores move each site's close.Trigger on each site's actual close, not a fixed clock time.
Part 5 · Options

Generating options, and expressing each in the model

Only now do we design, and we design more than one answer. Each option is a different shape of queue, so each can be written in the same symbols and compared before anyone builds anything.

Option A: central pull

A central server connects to each site in turn, c sites at a time, and pulls the files. It is a serial queue, so the time grows in step with the number of sites:

TA = ⌈S / c⌉ · τ

It is simple and centrally controlled. But the central server is a single point of failure, and it needs connections into every site, which many security teams won't allow.

Option B: site relay

Each device hands its files to the in-store server over the LAN. The server bundles them and sends once. The estate now has S senders instead of S · d, and the devices do almost no work:

peak bandwidth ≈ S · τ · B / (σ√2π)  ·  new sessions ≈ S / (σ√2π)

Option C: direct from every device

Every device uploads its own files to the landing storage with a short-lived pre-signed URL. That makes S · d senders, the classic storm. The site uplink still limits each site, so peak bandwidth is the same as option B, but the inspection layer and SIEM see a new session for every file:

new sessions ≈ S · d · f / (σ√2π)d · f times option B

Testing the options at three scales

Because the scale is unknown, we plug in three illustrative estates and see how each option behaves. All three use the same assumptions: one time zone, f = 2 files of s = 5 MB, B = 20 Mbit/s, σ = 1.5 minutes, and c = 10 for option A.

QuantitySmall
50 sites × 10
Medium
2,000 sites × 40
Large
20,000 sites × 50
Devices50080,0001,000,000
Volume per night, V5 GB800 GB10 TB
Site drain time, τ40 s160 s200 s
A · time to finish≈ 3 min≈ 9 h≈ 4.6 days
B, C · time to finish≈ 5 min≈ 7 min≈ 8 min
B, C · sites sending at once≈ 9≈ 1,400≈ 17,700
B, C · peak bandwidth on the path≈ 180 Mbit/s≈ 28 Gbit/s≈ 355 Gbit/s
B · new sessions at inspection≈ 13 per min≈ 9 per s≈ 89 per s
C · new sessions at inspection≈ 4 per s≈ 709 per s≈ 8,865 per s

The model now teaches something no single number could: the best option depends on scale. At small scale the storm hardly exists and the simplest design wins. At medium and large scale, option A runs out of time, while B and C finish quickly but hit the path with a synchronised burst far beyond any VPN hub. None of them fails at the cloud. And none of them changes σ, the one term that sets the height of the pulse.

Other differences don't depend on scale: option C needs an agent and a credential on every device, B needs one per site, and A needs one central identity with access into every site. A fourth possibility is to buy a managed file transfer (MFT) product. It still implements one of these shapes, so the same model applies.

Part 6 · Decision

From model to decision

Without the scale, the architect's output is not a single design but a decision rule: two inequalities that any future numbers can be tested against.

① C ≥ V / Twcapacity floor: enough capacity even if load were perfectly smooth
② σ ≥ S · τ · B / (C · √2π)  and  3σ + τ ≤ Twspread the starts enough to fit under C, still inside the window

Rule ② is the key engineering move. σ is not just an observation: we can choose it, by giving each site a random offset after close. It is the cheapest lever in the model. Here is the rule applied to the three estates, assuming the narrowest shared resource carries C = 1 Gbit/s and the window is Tw = 6 hours:

Estate① Capacity floor② Spread neededDecision
Small≈ 2 Mbit/s ✓σ ≥ 0.3 min, which natural spread already gives ✓Keep it simple. Option A or B, no storm engineering needed.
Medium≈ 300 Mbit/s ✓σ ≈ 43 min, finishing in about 2.2 h ✓Option B with a random offset per site.
Large≈ 3.7 Gbit/s ✗σ ≈ 530 min, finishing in about 27 h ✗No option fits one 1 Gbit/s hub. Change the path: for example six regional hubs, each needing σ ≈ 90 min and finishing in about 4.5 h, or a route agreed with security in which inspection happens in the cloud.

This is the point of modelling. The large estate is ruled out by rule ①, a single division, before anyone argues about products. The fix (more capacity, or splitting the path) falls straight out of the formula.

Only now, with a rule that chooses, does it make sense to draw the path a file takes. For a medium estate the rule chooses option B, and the architecture looks like this, labelled in the model's own symbols:

POS devices, site server, site uplink, VPN hub, inspection, landing zone, final cloud POS devicesd per site Site serverbundle, offset Site uplinkB VPN hubpart of C InspectionZscaler → SIEM Landing zoneBlob / S3 Final cloudS3 / Blob LAN copy, low CPUσ chosen by rule ②τ = d·f·s / B≥ S·τ·B / (σ√2π)S / (σ√2π) sessionsabsorbs the burststeady replication Window: 3σ + τ ≤ Tw

Making the design robust

Every term in the model becomes a specific engineering decision:

TermEngineering decision
σ spreadA per-site random offset after close, seeded from the site ID, triggered by each site's actual close rather than a fixed time.
Device budgetDevices only copy over the LAN, at low priority, and never during a transaction. Compression happens on the site server.
q failure rateResumable multipart uploads, idempotent object names (a retry overwrites rather than duplicates), and checksums verified on landing.
k retriesExponential backoff with full jitter, a cap on attempts, and honouring HTTP 429 and Retry-After.
C narrowest linkMeasure VPN hub and inspection throughput by load test, and agree an inspection policy with security for this known, scheduled traffic.
L backlogStore-and-forward. A site offline overnight keeps its bundle and sends it when the link returns.
Tw windowThe landing zone absorbs the burst, and event-driven replication forwards to the final cloud at a steady, cost-controlled rate.
EvidenceA manifest per site, reconciled against what arrived, produces the morning completeness report.

The method, in one line: understand the request, classify the requirements, model devices and files in symbols, compare the options in the same symbols, turn the model into a decision rule, and only then draw.

Part 7 · Try it

The simulator

The simulator models every device sending directly (option C) across the three time zones, so you can watch the raw storm and the levers that tame it. Start with the baseline, then try spreading the starts (the σ decision from Part 6), a flaky network, and retries without jitter, and compare the maths table with what the simulation measured. Its “serial relay” row is option A.

Files arriving per minute

Files per minute Busiest minute Design capacity

The maths behind it

Closed-form estimates beside what the simulation measured.

How the model works

The lesson the numbers teach: size for the peak, not the average. The busiest minute is around 300 times the daily average, yet elastic object storage absorbs it at under 10% of its limit when every site sends in parallel.

Planning a fleet-scale data pipeline?

We design edge-to-cloud integrations that stay fast, cheap and supportable at thousands of sites.