Exchanges have started running other companies' code inside the auction, as containers next to the impression. We wanted to know what that costs in compute, memory and latency, and how the cost changes as more bidders take part.
We built a small auction and ran container bidders on a single 8-vCPU cloud machine costing $0.40 an hour. With 32 fixed-bid bidders executing on every impression, the highest tested passing rate rose from 2,000 to 8,000 impressions per second when we batched requests. Both rates passed two 15-second repeats. At 8,000/s, compute costs about $0.03 per million impressions auctioned (offered to all 32 bidders, not bought), assuming traffic averages half that tested rate. These short runs do not establish sustained production capacity.
This is an early exploration with synthetic traffic and simple bidders. Below is what we built, what we measured, the optimisations that helped, and what we plan to test next.
Background: containers in the bidstream
In a conventional programmatic auction, the exchange sends a bid request over the internet to each buyer's platform and waits for a reply. Exchanges typically allow 100 ms or more for that round trip2.
IAB Tech Lab's
Agentic Real-Time Framework (ARTF) v1.0,
released in November 2025, standardises a different model. Partners package
their logic as OCI containers and the exchange
runs them inside its own infrastructure. ARTF v1.0 defines one call,
GetMutations. Through it, a container proposes changes to a request or
response, such as activating segments or deals, adjusting floors, or shading a
bid price. It does not define a way for a container to submit a new bid.
Bidding from inside the exchange is happening anyway, outside the standard:
- Index Exchange and Bedrock Platform: in April 2026, Bedrock deployed its bidder as a container inside Index Cloud, keeping full control of its decisioning and bidding. In September, PMG began a pilot using Bedrock as its bidding layer. Index reports about 4 ms response times for the containerised bidder, against up to 250 ms over the public cloud.
- Data and curation containers: PubMatic (Decision Fabric), OpenX (OpenXBuild) and Magnite run or plan partner containers for enrichment and curation, with response windows of roughly 5–10 ms.
We are not designing a bid-submission protocol here. We assume bidders will run inside exchanges, as Bedrock already does. For cost, it makes little difference whether a container returns a bid or a mutation: an eligible container receives a request, runs its logic and must answer in time. That execution is what we measured.
The setup
Everything that serves an auction runs on one Google Cloud c4-standard-8 virtual machine: 8 vCPUs (Intel Xeon Platinum 8581C), 30 GiB of RAM, Ubuntu 24.04. At the on-demand list price it costs $0.39534 an hour, or about $290 a month1. A second machine of the same size generates synthetic impressions, so load generation does not compete with the auction for CPU.
For each impression, the auction worker:
- Works out which bidders are eligible. Bidders exclude countries through blocklists, and excluded bidders are never called.
- Calls every eligible bidder over gRPC, in parallel.
- Collects the bids and returns a result before a 50 ms deadline2.
The worker is written in Rust. Each bidder is a small Rust service packaged as a 6.8 MiB OCI image. It is started by containerd and run under either runc (the standard Linux container runtime) or gVisor (a sandbox that puts a user-space kernel between the container and the host). We also ran the same binary as a plain process, with no container at all, as a control. Every bidder gets the same limits: 2 vCPUs and 512 MiB of memory.
We tested two kinds of bidder logic and kept each one fixed throughout:
- Fixed bid: returns a constant price. This measures the cost of the plumbing alone.
- Click model: a logistic regression that predicts click probability from 10 categorical fields: campaign plus 9 anonymised attributes. Each field is hashed into one of 65,536 buckets, so a prediction is 10 weight lookups, a sum and a sigmoid. We trained it on 40,000 rows of Criteo's public attribution dataset. The bid is the floor price plus the predicted score. It is a realistic shape of computation, not a tuned commercial model.
We varied three things: active bidders per impression (1 to 32, the bidders that actually run), loaded bidders (up to 96, the bidders held in memory), and traffic (impressions per second).
A test point counts as a pass only when 99% of auctions complete within 40 ms, at most 0.1% of auctions or bidder calls error, and the load generator drops no scheduled starts. Scheduling delay counts toward measured latency. Each point was repeated, and a point passes only when every repeat passes.
How big is 8,000 impressions a second?
Our test rates sound large but are small next to real exchange traffic. Large exchanges handle millions of requests per second. The traffic a particular buying platform receives depends on its QPS limits and which opportunities are routed to it3.
The company figures are not like for like. PubMatic counts every ad request it processes, Index counts ad slots, and The Trade Desk counts opportunities it evaluates. They are global and overlap, because the same impression is often offered through several exchanges. The order of magnitude is the useful part.
These figures do not establish UK traffic or the number of machines needed to serve it. That would require the actual routed traffic, bidder mix, peaks and redundancy requirements.
Capacity: each active bidder costs CPU
At a fixed 5,000 impressions per second, measured CPU rose from 0.12 cores with no eligible bidders to 5.68 cores with eight. A finer sweep filled in the gap between eight and sixteen: CPU levelled off around 6.3 cores while latency rose. These counters cover the worker, bidders and container runtime, not total host utilisation.
Twelve active bidders passed all three repeats. Thirteen passed two; the third breached the latency limit. Fourteen and above failed every repeat. At sixteen, only about 3,000–3,300 impressions per second completed within 50 ms. At thirty-two, that fell to about 930–1,100.
The plateau does not show that all eight host CPUs were consumed. It shows the service reaching a limit: measured CPU stopped rising while response times and errors worsened. Coordinating the bidders may be the bottleneck; we still need to test that. Two overloaded 24-bidder windows also dropped scheduled generator starts; those failures remain visible in the measurements.
So the traffic one machine can carry falls as the number of active bidders rises. With the fixed-bid bidders, the highest tested rate where every repeat passed was:
| Active bidders per impression | Highest passing rate | Bidder calls per second |
|---|---|---|
| 8 | 8,000 impressions/s | 64,000 |
| 16 | 4,500 impressions/s | 72,000 |
| 32 | 2,000 impressions/s | 64,000 |
The click model gave almost the same limits (4,000/s at 16 active). In a matched comparison on the same machine, it used 11–12% more CPU than the fixed bid. At this model size, the cost of the model is small next to the cost of sending each request to a bidder and getting the answer back.
Isolation: runc and gVisor have different costs
We ran the same bidder binary three ways: as a plain Linux process, as a container under runc, and as a container under gVisor. runc and native processes had similar CPU use and latency in this test. This comparison used click-model bidders at 2,000 impressions per second, with 16 bidders loaded and two 20-second repeats per point.
gVisor is a different matter. It intercepts the container's system calls in a user-space kernel, which gives a stronger boundary for untrusted code and costs CPU on every request. At 16 active bidders:
| Plain process | runc | gVisor | |
|---|---|---|---|
| CPU cores | 4.1 | 4.1 | 6.7 |
| 99th-percentile latency | 4.3 ms | 4.3–4.5 ms | 11.9–12.3 ms |
| Worker and bidder memory | 22 MiB | 24 MiB | 288 MiB |
A separate fixed-bid sweep, with 32 bidders loaded and 16 active, reached a highest tested passing rate of 4,500/s under runc and 2,500/s under gVisor. Each point used two 15-second repeats. Native-process capacity was not swept. These are observed passing rates for this workload, rather than exact capacity limits.
The isolation boundary affects the resource budget, but these host-networked lab configurations were not security-qualified for hostile buyer code.
Memory and cold starts
CPU tracks the bidders that run. Memory tracks the bidders that are loaded, whether they run or not. We gave each bidder 64 MiB of private state, kept 4 bidders active per impression, and increased the number registered on the machine.
In this test only 16 of the registered bidders could ever be eligible for the traffic we sent. Loading only those 16 kept memory at 1.2 GiB however many were registered. Loading all 96 used 6.5 GiB, with no change in the work done per impression.
The obvious response is to unload idle bidders and start them when needed. The catch is start-up time.
No runtime came back in time to bid on the impression that triggered the start. Even a plain process took about 55–62 ms. A runc container took about 100–110 ms, and gVisor took over 5 seconds. These times exclude downloading the image. So an exchange that unloads bidders to save memory will miss auctions while they restart, unless it starts them ahead of demand.
Optimisations: change the platform, not the bidder
Next we left both bidders' logic untouched and changed only how the worker delivers requests to them. Batching was the largest gain. Instead of one gRPC call per impression per bidder, the worker groups the requests waiting for the same bidder into a single call. Every bidder decision still runs; there are just fewer calls to make.
With 32 active fixed-bid bidders, batching took the highest tested passing rate from 2,000 to 8,000 impressions per second on the same machine. The click model reached 7,000/s with batching.
We ran a longer comparison at 5,000/s with 32 active bidders: three 60-second repeats per setup. For fixed bids, the unbatched setup failed all three (99th-percentile latency 119.4–127.1 ms), while batching passed all three (5.7–6.0 ms). For the click model, the corresponding ranges were 122.7–129.5 ms and 6.6–7.2 ms, again with all baseline repeats failing and all batched repeats passing. These longer runs confirm the comparison at 5,000/s; the 8,000/s result comes from the shorter sweep.
Batching gains most when there is a lot to batch. At 32 active bidders and 2,000/s, each call carried 3.7–3.8 requests on average; at 4 active, barely more than one.
We tested each change on its own at 16 active bidders and 2,000 impressions/s:
| Change | CPU change, fixed bid | CPU change, click model |
|---|---|---|
| Batch requests to each bidder | -39% | -40% |
| Run four bidders per process | -22% | -23% |
| Pin work to specific CPUs | -13% | -11% |
| Precompute which bidders are eligible | -3% | +1% |
| Parse each request once, not per bidder | -3% | 0% |
| Lower the per-bidder concurrency limit | -3% | -2% |
Running four bidders in one process saves CPU but removes the isolation between them. It is only an option for bidders from the same owner. The last three changes made little difference at this scale. CPU pinning reduced CPU use but increased worst p99 latency from 5.14 to 6.01 ms for fixed bids and from 5.24 to 5.84 ms for the click model; both settings still passed.
We also split traffic across two machines. A 4,000/4,000 split of 8,000 impressions per second passed; a 6,000/2,000 split failed every run, even though the two machines together had the same total capacity. Spare capacity on the quieter machine did not help the busier one.
The economics: what does a bidder cost?
The machine costs $0.39534 an hour whether it is busy or idle. Its cost per impression therefore depends on how much traffic it serves on average. Real traffic rises and falls through the day, so we assume the machine averages half its highest tested passing rate. This example uses fixed-bid bidders:
| 32 active bidders | Highest tested passing rate | Compute per million impressions | Allocated compute per million bidder evaluations |
|---|---|---|---|
| Unbatched | 2,000/s | $0.11 | $0.0034 |
| Batched | 8,000/s | $0.027 | $0.00086 |
The last column divides the whole machine bill equally among 32 identical, equally active bidders. Each impression produces one evaluation per bidder. This is an average allocation, not a measured marginal cost or a customer price.
Whether that is cheap depends on what the bidder earns from those requests. Three terms matter:
- CPM: the price paid per 1,000 impressions won. Open-market display CPMs are around $1–2; for example, $1.21 in the US in January 2023 (Operative) and a £1.05 average publisher eCPM in the UK in 2024 (Pubstack).
- Bid rate: the share of requests a bidder bids on. Index Exchange notes that DSPs often bid on fewer than 5% of the opportunities they receive.
- Win rate: the share of requests that end in an impression the bidder pays for. This is the number that matters here, because the bidder's code runs on every request but media is bought only on wins.
So the compute cost relative to media spend is: cost per request ÷ (win rate × CPM ÷ 1,000).
At a $1 CPM with batching, a bidder that wins 1 request in 1,000 spends about $1 on media per million requests and is allocated $0.00086 in compute: 0.09%. At 1 win in 100,000 that rises to 8.6%. At 1 in a million, compute is 86% of media spend; without batching it is more than three times the spend. A bidder that receives a broad stream of traffic but rarely buys still consumes compute on every evaluation, so filtering what reaches a bidder matters as much as how fast it runs.
These figures cover the serving machine only. Storage, networking, logging, redundancy and operations come on top.
What we're working on next
- Dedicated hardware. Cloud vCPUs are shared with other tenants. Repeating the tests on bare metal removes that source of variation from latency and capacity results.
- Faster cold starts. Every start we measured missed the 50 ms deadline.
Options we want to measure on the same harness:
- Warm pools that keep a few spare instances ready.
- Firecracker microVMs. They are specified to boot in 125 ms or less, and snapshots can restore in a few milliseconds. However, one study measured over 200 ms before a restored function finished its first run (FaaSnap).
- WebAssembly runtimes such as Wasmtime, which reported about 5 microseconds to instantiate a particular precompiled module in a 2022 benchmark, with loading and preparation done beforehand. That measures module instantiation, not a complete bidder cold start.
- Cheaper strong isolation. gVisor roughly halved the highest passing rate in the fixed-bid comparison above. Firecracker and WebAssembly offer different trade-offs between isolation and overhead, and we want numbers for both.
- A realistic bidder mix. Real bidders carry larger models and more state. In an earlier test, a deliberately CPU-heavy bidder used about four times the CPU of our click model. Cost needs to be estimated per class of bidder, not per bidder.
- Fleets. A scheduler that decides which bidders run on which machine and spreads traffic evenly, with a load balancer in front. Our two-machine test showed uneven placement fails before total capacity runs out.
- Longer runs and bursts. Hours rather than minutes, with repeated traffic spikes. After one spike, latency recovered before memory returned to its earlier level.
- The full cost. Network, storage, logging, monitoring and redundancy on top of serving compute.
If you run containers inside an exchange, or bid from one, we would like to compare numbers.
Notes
Machine price. Google Cloud on-demand list price for c4-standard-8 in us-central1 (Iowa), $0.39534 per hour, checked 23 October 2026 (pricing). Disk and network are extra. The load generator is not counted in serving cost.
The 50 ms deadline is our choice, not a standard. OpenRTB's
tmaxfield lets each exchange set its own limit; the OpenRTB 2.6 spec uses 120 ms as an example. Google Authorized Buyers deadlines typically range from 80 to 1,000 ms, and Index Exchange sets a minimumtmaxof 100 ms. ARTF sets no fixed budget. Those limits include an internet round trip, which a bidder inside the exchange does not need, so we used a tighter 50 ms deadline and required 99% of auctions to finish within 40 ms. Exchanges quote 4–10 ms windows for their container products. In our passing tests, the 99th percentile was typically 3–30 ms.Traffic visible to a buying platform. Index Exchange uses an illustrative estimate of 10 million QPS across the open internet, then explains that individual DSPs might cap reception at 1–3 million QPS. The 10 million figure is not traffic received by one DSP. Neither this estimate nor a country's share of digital ad spend establishes its share of routed bid requests.
How we measured. Latency runs from when each request was scheduled to be sent, so queueing under load counts. CPU comes from Linux cgroup counters, cross-checked against per-process clocks, and includes the container runtime's own processes. Memory is proportional set size (PSS), which splits shared pages between the processes using them. Bidders use host networking; TLS and Kubernetes are not in the measured path. Traffic and inventory are synthetic.
References
Standards and specifications: ARTF v1.0 · OpenRTB 2.6 · OCI runtime spec
Software: containerd · runc · gVisor · gRPC · Firecracker · Wasmtime instantiation performance
Containers in exchanges: Bedrock in Index Cloud (Apr 2026) · PMG pilot (Sep 2026) · Index Cloud efficiency (Oct 2026) · PubMatic Decision Fabric (Jun 2026) · OpenXBuild · Magnite (Aug 2026)
Volumes: PubMatic FY2025 results (336.8tn impressions processed) · Index Exchange, 270bn slot requests a day (2022) · OpenX, 3M QPS (Sep 2026) · The Trade Desk 2019 10-K (790bn opportunities a day) · Index Exchange on QPS
Prices and win rates: Operative, US open-market CPM · Pubstack UK benchmark · O'Kelley, win-rate examples (2016)
Cold starts: Firecracker, NSDI 2020 · FaaSnap, EuroSys 2022
Model data: Criteo attribution dataset (CC BY-NC-SA 4.0)