By Anant MishraDesign study
Standard-library Python ran three authored traces twice with identical ledgers and hashes. The figures are synthetic. Provider throughput, model output, deployment and real spending were outside the experiment.
Design feature 01
3 fictional traces
Design feature 02
4 paid hours per trace
Design feature 03
320 jobs per trace
Executive Summary
Replay three four-hour arrival patterns. Each has 320 fictional jobs and a $32 on-demand baseline. Only the timing changes the amount of capacity they use.
Architectural Deep Dive
Design study with fictional demand and prices. A team is comparing two ways to serve 320 equal inference jobs within four hours. Finance has the volume and the offer. Engineering has three possible arrival patterns. The question for this study is how much of the alternative bill a fixed block of capacity can replace in each pattern. A downloadable Python reference runs the calculation and retains each hour so a reviewer can inspect the answer.
The contract the reference evaluates
The fictional block costs 600 US cents for each of four consecutive hours and has room for 100 equal jobs per hour. Every job must complete within its arrival hour. Anything beyond that hour’s capacity goes immediately to an unlimited on-demand service at ten cents per job. There is no carry-forward, queue, retry or partial job. The alternative is to send every job to the same on-demand service. Both options account for the same 320 jobs.
Two real billing distinctions motivated the exercise. Microsoft describes charging for deployed provisioned capacity during idle hours in its billing guide. Its spillover guide describes charging applicable token rates on a separately configured standard deployment. The fixture simplifies both. A slot has no conversion to a PTU, and ten cents represents one uniform job. The reference makes no network calls.
Three ledgers with the same total
| Arrivals by hour | Covered / overflow | Total with capacity |
|---|---|---|
| 80, 80, 80, 80 | 320 / 0 | $24 |
| 0, 0, 160, 160 | 200 / 120 | $36 |
| 40, 0, 140, 140 | 240 / 80 | $32 |
Take hour three of the second row. Its 160 jobs produce 100 covered jobs and 60 overflow jobs. The hour costs $6 for the block and $6 for overflow. Hour four looks the same. Hours one and two cost $6 each despite receiving no jobs. The four invoices add to $36. The all-on-demand alternative costs $32 in every row. The third row lands exactly on that price, which makes it a useful test of the equality boundary.
What to check in the arithmetic
Check the population twice. Within each hour, covered jobs plus overflow must equal arrivals. Covered jobs plus unused slots must equal 100. In the burst row, 200 slots expire unused at the start even though the team has 120 overflow jobs later. Adding arrivals across hours before applying the capacity limit hides both quantities. Keeping zero-demand rows makes the fixed charge visible and prevents a second error, counting only the hours that generated usage records.
A second check works directly in money. Subtract the all-on-demand bill from the mixed bill. The result must equal the fixed charge minus the on-demand value of the covered jobs. For the burst row, that is $24 minus $20, a $4 premium. For the steady row, the difference is $24 minus $32, or $8 less. This identity provides a separate way to review a model built from a long spreadsheet or a monthly invoice export.
Reproduce it and change one assumption
Save the three input traces and the Python reference in one folder. Run python3 replay.py. Compare the results and SHA-256 hashes with the retained execution record. The clock records each fresh run. The replay notes explain the fields and how to add a trace. A second local execution reproduced the same ledgers and hashes.
For a hand check, move ten jobs from the third hour of the burst trace to the first, leaving the total unchanged. Each of those jobs moves from an overflowing hour into an unused slot. At ten cents per job the four-hour total should fall by one dollar. In an operational review, the first question would be whether those ten inputs even existed in hour one. An arithmetic improvement needs a feasible schedule before a team can budget for it.
Where the evidence stops
An hourly bucket assumes all 100 slots in it can be used before the deadline. Two spikes a minute apart might overload a real deployment even when their combined hourly count looks modest. Real requests have different token lengths, cache states and processing demands. An overflow destination may also have its own quota, location restrictions, errors and latency. A model that needs any of these properties must represent and test them explicitly.
To apply the design, retain an authorised arrival trace, deployment and route eligibility, a dated price agreement, token usage by destination, completion deadlines and invoice lines for the same period. Reconcile completed service as well as money. The companion capacity purchasing guide explains how to use that evidence. This study establishes three reproducible arithmetic results. The evidence for throughput sizing, a procurement commitment or a production saving would have to come from the workload itself.
Proposed approach
- Method
- Hourly replay in integer USD cents
- Materials
- Inputs, Python source and execution record
Sources
- Provisioned throughput billing and cost management — Microsoft Learn · checked 2 December 2026
- Manage traffic with spillover for provisioned deployments — Microsoft Learn · checked 2 December 2026
Related reading
Read the publishing standards or suggest a correction.