RTB Architecture
How Real-Time Bidding Works: The Ad Auction Step by Step, in Milliseconds
Published · Last updated
Next scheduled review:
Real-time bidding (RTB) is the auction that sells one ad impression while a page or app loads. The seller's platform sends a bid request describing the slot, buyers reply with prices before a deadline, and the highest valid bid wins. At Google that deadline typically ranges from 80 to 1,000 milliseconds (Google, September 2026).
Contents
Key facts
- The deadline travels in the request. The OpenRTB field
tmaxstates how many milliseconds buyers have, "including Internet latency" (IAB Tech Lab, OpenRTB 2.6). Google says its deadline typically ranges from 80 to 1,000 ms and requires 85 percent of responses to arrive in time (Google Authorized Buyers, updated 17 September 2026). - First-price auctions are now the norm. Google said on 10 May 2019 that Ad Manager would move to "a unified, first price auction" that year (Google, 10 May 2019). In March 2019 AdExchanger wrote that "every major exchange has switched over to a first-price auction" (AdExchanger, 15 March 2019).
- The standard still defaults to second price. In OpenRTB 2.6 the auction-type field
atdefaults to 2, "Second Price Plus"; 1 means first price (IAB Tech Lab, OpenRTB 2.6). Exchanges that run first-price auctions must say so. - Browsers wait longer than servers. Prebid.js, the open-source header bidding library maintained by Prebid.org, waits 3,000 ms for bids by default (Prebid.js source, accessed 9 November 2026). Its server-side timeout defaults to 75% of that or 750 ms, whichever is lower (Prebid.org, Prebid Server module).
- Privacy signals ride in every request. OpenRTB 2.6 moved the flag for the EU General Data Protection Regulation (GDPR) and the consent string into standard fields and added Global Privacy Platform fields in November 2022 (OpenRTB 2.6 change log). New EU consent strings had to use version 2.3 of IAB Europe's Transparency and Consent Framework (TCF) from 1 March 2026, according to Google (Google AdSense Help, 2 March 2026).
Definition
Real-time bidding: a method of selling ad impressions in which an exchange runs a separate auction for each impression, sends a structured bid request to eligible buyers and accepts priced responses until a stated deadline.
Key terms on this page: real-time bidding (RTB) · bid request · bid response · tmax · first-price auction · second-price auction · bid shading · floor price · consent string · OpenRTB
How does RTB work? The short answer
Picture an auction house where each lot is a single view of an ad slot. The auctioneer describes the lot, every bidder in the room gets one chance to shout a price, and the gavel falls on a timer. Nobody waits for latecomers. Then the next lot comes up, and the process repeats.
In RTB the auctioneer is an ad exchange, usually run by a supply-side platform (SSP) on behalf of a publisher. The bidders are demand-side platforms (DSPs) acting for advertisers. The description of the lot is a bid request, a small JSON document written to the OpenRTB standard from IAB Tech Lab. The shout is a bid response. The timer is a field called tmax.
Three things make RTB different from older ways of buying ads. The sale happens per impression, not per block of a million. The buyer sees who is likely to view the ad, not just which site it runs on. And the whole exchange takes place inside the time it takes a page to load. RTB is one part of programmatic buying; the wider picture is in what is programmatic advertising.
The auction step by step: a timeline in milliseconds
The table follows one web display impression. The clock values are illustrative, built around a tmax of 120 ms, the value in the sample request of the OpenRTB 2.6 specification. Real timings vary by exchange, region and format; Google's deadlines run from 80 to 1,000 ms (Google Authorized Buyers, 17 September 2026).
9 of 9 rows
0 | Browser or app | The page reaches an ad slot and asks for an ad; a header bidding wrapper may start a pre-auction | Not part of OpenRTB; Prebid.js |
0 to 15 | SSP | Reads consent, looks up the slot's settings and floors, builds the bid request |
|
15 | Exchange | Picks eligible DSPs, stamps the deadline, sends the request to each one at once |
|
15 to 45 | Network | The request travels to each DSP's servers; this time counts against the deadline | Included in |
45 to 110 | DSP | Parses the request, matches the user, checks targeting, budget and frequency, predicts value, shades the price | Internal to the DSP |
By 135 | DSP to exchange | The bid response arrives, or the DSP sends "no bid"; anything later is ignored |
|
135 to 145 | Exchange | Drops bids below the floor or breaking blocks, ranks the rest, picks the winner |
|
145 to 160 | Publisher ad server | Compares the winner with direct campaigns and other demand, then chooses the ad | Outside OpenRTB |
After 160 | Browser, exchange, DSP | The creative loads; the exchange fires win and billing notices; losers may get a loss notice |
|
0
- Who acts
Browser or app
- What happens
The page reaches an ad slot and asks for an ad; a header bidding wrapper may start a pre-auction
- Where it shows in OpenRTB
Not part of OpenRTB; Prebid.js
bidderTimeoutgoverns the wait
0 to 15
- Who acts
SSP
- What happens
Reads consent, looks up the slot's settings and floors, builds the bid request
- Where it shows in OpenRTB
imp,siteorapp,device,user,regs
15
- Who acts
Exchange
- What happens
Picks eligible DSPs, stamps the deadline, sends the request to each one at once
- Where it shows in OpenRTB
tmax,at,source.schain
15 to 45
- Who acts
Network
- What happens
The request travels to each DSP's servers; this time counts against the deadline
- Where it shows in OpenRTB
Included in
tmax
45 to 110
- Who acts
DSP
- What happens
Parses the request, matches the user, checks targeting, budget and frequency, predicts value, shades the price
- Where it shows in OpenRTB
Internal to the DSP
By 135
- Who acts
DSP to exchange
- What happens
The bid response arrives, or the DSP sends "no bid"; anything later is ignored
- Where it shows in OpenRTB
seatbid.bid.price,adm,dealid
135 to 145
- Who acts
Exchange
- What happens
Drops bids below the floor or breaking blocks, ranks the rest, picks the winner
- Where it shows in OpenRTB
imp.bidfloor,bcat,badv
145 to 160
- Who acts
Publisher ad server
- What happens
Compares the winner with direct campaigns and other demand, then chooses the ad
- Where it shows in OpenRTB
Outside OpenRTB
After 160
- Who acts
Browser, exchange, DSP
- What happens
The creative loads; the exchange fires win and billing notices; losers may get a loss notice
- Where it shows in OpenRTB
nurl,burl,lurl
Table by AdSovereign, CC BY 4.0.
Each step has a job worth knowing:
- The ad call. When a browser or app reaches an empty slot, it asks the publisher's systems for an ad. Many websites first run header bidding, which collects bids from several SSPs before the ad server decides. The header bidding guide covers that pre-auction.
- The bid request. The SSP turns what it knows into a bid request: the slot size, the page or app, the device, a coarse location, consent signals and the floor. It sends only what the user's consent and the publisher's settings allow.
- The fan-out. The exchange sends the request to many DSPs in parallel. Large DSPs cannot read every request they could receive, so exchanges and DSPs agree volume limits, measured in queries per second (QPS). The trade-offs are covered in QPS, latency and bid performance.
- The decision. Inside the DSP, a bidder checks the request against every live campaign. It asks whether the user is in a target audience, whether the frequency cap is reached and whether budget remains. It then predicts what the impression is worth and sets a price.
- The response. The DSP returns a price and the ad, or says no. The OpenRTB guidance lists an empty HTTP 204 reply as the cheapest way to decline (IAB Tech Lab, OpenRTB implementation notes).
- The auction. The exchange discards late bids, bids under the floor and ads that break the publisher's blocks. It then ranks the rest by price, or by deal priority where deals apply.
- The final choice. The publisher's ad server compares the exchange's winner with direct campaigns. A sponsorship sold by the sales team can still take the slot.
- The notices. When the ad wins and renders, the exchange calls the winner's notice URLs. The billing notice in
burlmarks the moment the impression becomes billable (IAB Tech Lab, OpenRTB 2.6).
Diagram by AdSovereign, CC BY 4.0.
What a bid request contains
A bid request is a short JSON document. The example below is a trimmed, valid OpenRTB 2.6 request for one mobile web banner. Values such as the domain and IDs are placeholders, and the privacy string is left as a label rather than a fake code.
{
"id": "8f3a2c71",
"at": 1,
"tmax": 120,
"imp": [
{
"id": "1",
"banner": { "w": 300, "h": 250 },
"bidfloor": 2.0,
"bidfloorcur": "USD",
"secure": 1
}
],
"site": {
"domain": "recipes.example",
"page": "https://recipes.example/healthy/quinoa-bowl",
"publisher": { "id": "pub-1042" }
},
"device": {
"devicetype": 4,
"os": "iOS",
"geo": { "country": "USA", "region": "OH" }
},
"user": { "id": "exch-user-77e1" },
"regs": {
"coppa": 0,
"gpp": "GPP_STRING_FROM_THE_CMP",
"gpp_sid": [7]
}
}7 of 7 rows
| Which auction this is, its type and the deadline |
|
| The slot: format, size, floor, currency, whether it is secure | One request can carry several slots; deals sit in |
| Where the ad will appear | A request carries one of |
| Device type, operating system, coarse location |
|
| An exchange user ID, consent string, extended IDs |
|
| Which privacy rules apply |
|
| Every company that handled the request before the buyer | Lets buyers check sellers against ads.txt and sellers.json |
id, at, tmax
- What the buyer learns
Which auction this is, its type and the deadline
- Notes from the specification
at1 is first price;tmaxis in milliseconds and includes network time (OpenRTB 2.6)
imp
- What the buyer learns
The slot: format, size, floor, currency, whether it is secure
- Notes from the specification
One request can carry several slots; deals sit in
imp.pmp
site or app
- What the buyer learns
Where the ad will appear
- Notes from the specification
A request carries one of
site,appordooh, never two (OpenRTB 2.6)
device
- What the buyer learns
Device type, operating system, coarse location
- Notes from the specification
devicetype4 means "Phone" in the AdCOM 1.0 list (AdCOM 1.0)
user
- What the buyer learns
An exchange user ID, consent string, extended IDs
- Notes from the specification
user.consentcarries the TCF string;user.eidscarries IDs such as UID2 where allowed
regs
- What the buyer learns
Which privacy rules apply
- Notes from the specification
gpp_sid7 points to the US National section of GPP (IAB Tech Lab, GPP sections)
source.schain (not shown)
- What the buyer learns
Every company that handled the request before the buyer
- Notes from the specification
Lets buyers check sellers against ads.txt and sellers.json
Table by AdSovereign, CC BY 4.0.
Every field, with the rest of the 2.6 objects, is annotated in OpenRTB 2.6 explained. To change values and test what is valid, use the planned OpenRTB bid request builder. The supply-chain checks are covered in SupplyChain object, ads.txt and sellers.json.
The answer is shorter. A bid response names the request it answers, the slot it bids on, a price and the ad. This one bids $5.80 per thousand on the slot above:
{
"id": "8f3a2c71",
"cur": "USD",
"seatbid": [
{
"seat": "agency-seat-12",
"bid": [
{
"id": "b1",
"impid": "1",
"price": 5.8,
"adomain": ["runningshoes.example"],
"crid": "rect-spring-v2",
"adm": "<a href=\"https://runningshoes.example\"><img src=\"https://cdn.example/rect.png\"></a>",
"burl": "https://dsp.example/bill?p=${AUCTION_PRICE}"
}
]
}
]
}The ${AUCTION_PRICE} macro is a placeholder the exchange replaces with the clearing price when it calls the URL (IAB Tech Lab, OpenRTB 2.6). The adomain field lets the publisher check the advertiser against its block list before the ad shows.
After the auction: win, billing and loss notices
The auction ends in milliseconds, but the record-keeping takes longer. OpenRTB gives the winning bidder three notice URLs it can include in its bid (IAB Tech Lab, OpenRTB 2.6):
- Win notice (
nurl). The exchange calls it when the bid wins. The specification warns that a win is "not necessarily indicative of a delivered, viewed, or billable ad". - Billing notice (
burl). The exchange calls it when the impression becomes billable under its own policy, typically when the ad is delivered or viewed. - Loss notice (
lurl). The exchange calls it when it knows the bid lost. Some exchanges do not send loss notices or hide the clearing price.
The gap between a win and a billable impression matters. A bid can win at the exchange and then lose at the publisher's ad server to a direct campaign. It can also win and never render, because the reader left the page. A DSP that counts wins and a publisher that counts renders will report different totals. Agreeing which notice defines a billable impression before a campaign starts prevents most of those disputes. Reconciling the two sides at impression level is covered in log-level data 101.
First-price vs second-price auctions
The auction rule decides what the winner pays, so it shapes how everyone bids. Compare a first-price auction with a second-price auction using two bids on one slot: DSP A offers $5.00 per thousand and DSP B offers $3.50, against a $2.00 floor. These figures are illustrative.
6 of 6 rows
Who wins? | The highest bid (DSP A) | The highest bid (DSP A) |
What does the winner pay? | Just above the second-highest bid, about $3.50 in the example | Its own bid, $5.00 in the example |
Best strategy for buyers | Bid your true value; the rule protects you | Bid below your true value; this is called bid shading |
Role of the floor | Can lift the price when only one bidder clears it | A hard minimum; bids below it are dropped |
OpenRTB code |
|
|
Where used today | Older setups and some deals; check the | Google Ad Manager since 2019 and other major exchanges |
Who wins?
- Second-price auction
The highest bid (DSP A)
- First-price auction
The highest bid (DSP A)
What does the winner pay?
- Second-price auction
Just above the second-highest bid, about $3.50 in the example
- First-price auction
Its own bid, $5.00 in the example
Best strategy for buyers
- Second-price auction
Bid your true value; the rule protects you
- First-price auction
Bid below your true value; this is called bid shading
Role of the floor
- Second-price auction
Can lift the price when only one bidder clears it
- First-price auction
A hard minimum; bids below it are dropped
OpenRTB code
- Second-price auction
at= 2, "Second Price Plus" (the default)- First-price auction
at= 1
Where used today
- Second-price auction
Older setups and some deals; check the
atfield- First-price auction
Google Ad Manager since 2019 and other major exchanges
Table by AdSovereign, CC BY 4.0.
For years the second-price rule dominated. It looked simple: bid what the impression is worth, and you never pay more than needed to beat the runner-up. Header bidding broke that logic. Publishers ran several auctions in a row, so the "second price" of one auction stopped meaning much.
Google described the problem when it announced its switch. Ad Manager could run a second-price auction for its own buyers, then a first-price comparison against other demand (Google, 10 May 2019). Google called the change a way to "create a fair and transparent auction for everyone". It also said publishers would see "all bids submitted for their ads" and buyers would see the price needed to win.
The first-price rule is easier to audit, because the winner pays what it bid. It also moves the job of finding a fair price from the exchange to the buyer. That job has a name.
Bid shading: how buyers avoid overpaying
Bid shading means bidding below what an impression is worth to you, by just enough to still win most of the time. AdExchanger defined it in 2019 as "a technique buyers use in first-price auctions to avoid paying too much" (AdExchanger, 15 March 2019).
Here is how it works in practice. A DSP values an impression at $6.20 per thousand. Its model has learned that on this site, at this hour, bids around $5.70 win most auctions. So it bids $5.80, keeps most of its win rate and saves 40 cents per thousand compared with a bid at full value. These numbers are illustrative.
Shading needs data about past auctions. Exchanges help by telling buyers what it would have taken to win. OpenRTB 2.6 added an AUCTION_MIN_TO_WIN macro for this purpose (OpenRTB 2.6 change log). Sellers built tools too: AdExchanger reported that Rubicon Project (now Magnite) launched one at the end of 2017 and PubMatic followed in February 2018 (AdExchanger, 15 March 2019).
Publishers watch shading closely, because it lowers clearing prices. Buyers ask a different question: whether their DSP shades in their interest or keeps part of the savings. Both sides are covered in bid shading explained.
Floors: the seller's minimum price
A floor price is the lowest bid a seller will accept. In OpenRTB it travels in imp.bidfloor, with a separate deal.bidfloor for each private deal (IAB Tech Lab, OpenRTB 2.6). For video and audio, sellers can also set floors that depend on ad length, using fields OpenRTB 2.6 introduced in 2022 and extended to deals in 2023 (IAB Tech Lab, OpenRTB implementation notes).
The switch to first price changed how floors work. Under second price, publishers raised floors to lift the price the winner paid. Google warned in 2019 that this habit "can erode trust" and that such floor strategies "will no longer be relevant" after the switch (Google, 10 May 2019). It launched unified pricing rules at the same time, with an initial limit of 100 rules.
Today a floor is a plain minimum. Many publishers adjust floors by page, device and time of day, an approach called dynamic floors. A news site might set $1.50 on article pages and $4.00 on its homepage. Setting floors well is covered in floor price strategy.
Timeouts and tmax: why speed decides who can bid
Every party in the auction works against a clock. The exchange sets the deadline in tmax, and it counts network time as well as thinking time (IAB Tech Lab, OpenRTB 2.6). A bid that arrives a millisecond late is treated as no bid.
Google's guidance for its buyers is a useful benchmark. The deadline "typically ranges from 80 to 1000 ms", and Google requires 85 percent of responses to arrive within it (Google Authorized Buyers, updated 17 September 2026). Bidders that miss that rate can be sent fewer requests. Google also advises bidders to aim below the deadline to leave a buffer for network delays.
On a web page there is a second clock. Prebid.js, which runs header bidding in the browser, waits 3,000 ms by default before it gives up on bidders (Prebid.js source). Prebid.org suggests setting the server-side timeout to 50% to 75% of the browser timeout and sends that value as tmax (Prebid.org, timeouts).
Distance matters. A bidder in Virginia answering an exchange in Frankfurt spends part of its budget on the ocean crossing. That is why large DSPs run servers next to the exchanges they buy from. The timeout trade-off is simple to state: longer timeouts let more bidders answer, but they delay the ad and can cost views. The planned RTB latency calculator works through the budget hop by hop.
Privacy signals in the bid request
A bid request can carry personal data, so it also carries the rules for using it. In OpenRTB 2.6 those signals sit in the regs and user objects (IAB Tech Lab, OpenRTB 2.6).
6 of 6 rows
Children's privacy (US) |
| 1 means the request falls under the US Children's Online Privacy Protection rules |
GDPR applies |
| 1 means GDPR applies, 0 means it does not, missing means unknown; a standard field since OpenRTB 2.6 |
EU consent choices |
| The Transparency and Consent Framework (TCF) string from the site's consent tool |
US and other privacy laws |
| The Global Privacy Platform (GPP) string and the sections that apply; added in 2.6-202211 |
Legacy US string |
| The older US Privacy String, being replaced by GPP |
Identity |
| Extended identifiers such as UID2, sent only where allowed |
Children's privacy (US)
- Field
regs.coppa- What it tells the buyer
1 means the request falls under the US Children's Online Privacy Protection rules
GDPR applies
- Field
regs.gdpr- What it tells the buyer
1 means GDPR applies, 0 means it does not, missing means unknown; a standard field since OpenRTB 2.6
EU consent choices
- Field
user.consent- What it tells the buyer
The Transparency and Consent Framework (TCF) string from the site's consent tool
US and other privacy laws
- Field
regs.gpp,regs.gpp_sid- What it tells the buyer
The Global Privacy Platform (GPP) string and the sections that apply; added in 2.6-202211
Legacy US string
- Field
regs.us_privacy- What it tells the buyer
The older US Privacy String, being replaced by GPP
Identity
- Field
user.eids- What it tells the buyer
Extended identifiers such as UID2, sent only where allowed
Table by AdSovereign, CC BY 4.0.
A consent string is a compact code. It records which purposes and which vendors a person agreed to. The string tells each vendor whether it has the person's consent, so a DSP can check whether the framework lets it use the personal data in that request. New EU strings had to follow TCF v2.3 from 1 March 2026, according to Google, which can limit or drop non-compliant ad requests (Google AdSense Help, 2 March 2026).
You can read a string yourself with the planned TCF consent string decoder. The legal side for European traffic is covered in GDPR, ePrivacy and the bidstream. Cookies still matter too: Google said in April 2025 that Chrome would keep third-party cookies (Digiday, 2025).
RTB explained alongside header bidding and deals
People often treat RTB, header bidding and deals as rival systems. They are layers of the same pipe.
- Header bidding decides which exchanges get to bid before the ad server chooses. Each exchange inside it still runs an RTB auction.
- Private deals run on RTB too. The seller adds a
pmpobject with deal IDs, and the buyer bids against those terms (IAB Tech Lab, OpenRTB 2.6). - Programmatic guaranteed uses the same request, with a deal flag that tells the buyer it must bid.
A bank buying a fixed-price package on a finance site and a shoe brand bidding in the open auction may receive the very same request. Only the deal terms inside it differ. The four deal types are compared in programmatic guaranteed vs PMP vs preferred deal vs open auction.
Where this page stops: the engineering view
This page explains the auction in plain terms. Engineers who build bidders or exchanges need more: request routing, caching, budget pacing across data centres, logging and reconciliation. Those topics live in RTB architecture explained and bidder architecture patterns. The RTB architecture hub links the full engineering set.
FAQ
How fast is real-time bidding?
Who runs the RTB auction?
Is RTB a first-price or second-price auction?
at still defaults to second price, so the exchange states its rule in each request.What happens if a DSP does not answer in time?
What data does a bid request share?
What is the difference between RTB and programmatic advertising?
Where to go next
How this works on owned infrastructure
The auction on this page lives inside a deadline, and every network hop between exchange and bidder spends part of it. Every company on that path also receives the bid request, with its consent and identity fields. AdSovereign packages the exchange, the bidder, a data management platform (DMP) and a clean room as one RTB stack meant to be deployed in the operator's own data centre or private cloud. When the auction and the bidder share a network, a request crosses fewer hops, and fewer outside parties see it. The operator also keeps the bid-level logs that bid shading and floor setting depend on. The architecture page traces that request path, and the security page describes how bid-level data is handled.
Sources
- IAB Tech Lab, OpenRTB 2.6 specification and change log, GitHub (release 2.6-202606, 11 June 2026). https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md
- IAB Tech Lab, OpenRTB 2.x implementation notes, GitHub (accessed 9 November 2026). https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/implementation.md
- IAB Tech Lab, AdCOM 1.0, List: Device Types, GitHub (accessed 9 November 2026). https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md
- IAB Tech Lab, Global Privacy Platform, Section Information, GitHub (accessed 9 November 2026). https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/Section%20Information.md
- Google Authorized Buyers, "Peer guide" (last updated 17 September 2026). https://developers.google.com/authorized-buyers/rtb/peer-guide
- Google, "An update on first price auctions for Google Ad Manager" (10 May 2019). https://blog.google/products/admanager/update-first-price-auctions-google-ad-manager/
- AdExchanger, "Everything You Need To Know About Bid Shading" (15 March 2019). https://www.adexchanger.com/online-advertising/everything-you-need-to-know-about-bid-shading/
- Prebid.org, "Prebid Timeouts" (accessed 9 November 2026). https://docs.prebid.org/features/timeouts.html
- Prebid.org, "Prebid Server module" (s2sConfig timeout default, accessed 9 November 2026). https://docs.prebid.org/dev-docs/modules/prebidServer.html
- Prebid.js source,
src/config.ts,DEFAULT_BIDDER_TIMEOUT(accessed 9 November 2026). https://github.com/prebid/Prebid.js/blob/master/src/config.ts
More sources (2)
- Google AdSense Help, "Recent transition to IAB TCF v2.3" (2 March 2026). https://support.google.com/adsense/answer/16942036?hl=en
- Digiday, "After years of uncertainty, Google says it won't be deprecating third-party cookies in Chrome" (April 2025). https://digiday.com/marketing/after-years-of-uncertainty-google-says-it-wont-be-deprecating-third-party-cookies-in-chrome