Building a DSP at Scale: Why Closed Auctions Are the Backbone of Clean Supply
Building a DSP at Scale: Why Closed Auctions Are the Backbone of Clean Supply
A Principal Architect's Guide to Open Inventory, Walled Gardens, and the Closed Auction Imperative for Large-Scale Media Planning
Table of Contents
- Introduction: The Trillion-Impression Problem
- The Three Inventory Paradigms Defined
- Why Inventory Type Is an Architectural Decision, Not Just a Media Decision
- Deep Dive: Open Auction Inventory — Scale Without Certainty
- Deep Dive: Closed Ecosystems — The Walled Garden Problem
- Deep Dive: Closed Auctions — The Clean Supply Imperative
- The Economics of Clean Supply: Why "Clean" Is a Financial Metric
- DSP Architecture for Large-Scale Media Planning
- Why Closed Auctions Dominate Modern Media Planning
- Implementation Playbook: Building Closed-Auction Capability Into Your DSP
- Observability, Metrics, and Reconciliation
- The Future: Supply Chain Transparency and the Closed-Auction Renaissance
- Conclusion
1. Introduction: The Trillion-Impression Problem
The programmatic advertising ecosystem processes trillions of ad impressions every year. At the peak of a global campaign, a single Demand-Side Platform (DSP) can receive tens of millions of bid requests per second. Each request represents a micro-auction: a publisher has a user on their page, an ad slot has opened, and in less than 50 milliseconds, dozens of buyers must decide whether to bid, how much to bid, and what creative to serve.
This is an engineering marvel. It is also a logistical nightmare.
For the teams building DSPs, the core challenge has never been purely technical. It is a question of supply quality at scale. When you are planning media for a Fortune 500 advertiser with a $50 million quarterly budget, you cannot afford to have 20% of your impressions served on fraudulent domains, adjacent to harmful content, or invisible to human eyes. The financial and reputational stakes are too high.
This is where the distinction between inventory types becomes mission-critical. The industry broadly segments programmatic supply into three paradigms:
- Open Auction Inventory — the vast, unfiltered ocean of the Open Web.
- Closed Ecosystems — the proprietary "walled gardens" of Meta, Google, Amazon, and TikTok.
- Closed Auctions — curated, deal-based access to premium supply via Private Marketplaces (PMPs), Preferred Deals, and Direct Guaranteed insertions.
Most industry commentary treats these three as parallel options. They are not. For anyone building a DSP intended to support large-scale media planning, closed auctions are not merely one option among three — they are the structural foundation upon which sustainable, scalable, brand-safe buying is built.
This article argues that thesis in detail. We will dissect the architecture, economics, and operational realities of all three inventory types, but we will spend the majority of our time inside closed auctions, because that is where the future of clean, predictable, premium programmatic buying lives.
If you are an architect, product leader, or engineering manager tasked with building or scaling a DSP, this is the blueprint you need.
2. The Three Inventory Paradigms Defined
Before we can argue for one paradigm, we must define all three with precision. Terminology in AdTech is notoriously loose, and ambiguity here leads to bad architectural decisions.
2.1 Open Auction Inventory
Open Auction inventory is the unguaranteed, real-time supply available to any buyer through the open programmatic marketplace. It is transacted via the OpenRTB protocol, typically in a first-price auction, and is characterized by:
- Fragmentation: Supply is sourced from millions of publishers, apps, and CTV platforms, aggregated through hundreds of Supply-Side Platforms (SSPs) and ad exchanges.
- Real-time clearing: Every impression is auctioned individually in under 100 milliseconds.
- Price volatility: CPMs fluctuate based on real-time supply and demand.
- Low barriers to entry: Any DSP can connect to an exchange and start bidding.
Open Auction inventory represents the "long tail" of the web. It is where volume lives. It is also where fraud, brand-safety violations, and made-for-advertising (MFA) sites concentrate.
2.2 Closed Ecosystems (Walled Gardens)
Closed Ecosystems are proprietary advertising platforms where a single company owns both the supply and the demand side of the transaction. The canonical examples are:
- Meta (Facebook, Instagram, Audience Network)
- Google (Search, YouTube, Display Network, Discover)
- Amazon (Retail Media, Fire TV, Twitch)
- TikTok, Snap, Pinterest, Reddit
These platforms do not participate in OpenRTB. They expose proprietary APIs (e.g., the Meta Marketing API, the Google Ads API). Buyers push campaigns, audiences, and creatives into the platform, and the platform's internal algorithms handle ranking, pacing, and delivery.
Walled Gardens offer enormous scale and rich first-party data, but they are black boxes. The buyer has limited visibility into exact placements, pricing mechanics, and fee structures. Data generated inside the garden does not leave.
2.3 Closed Auctions (Private Marketplaces, Preferred Deals, Direct Guaranteed)
Closed Auctions are the curated, deal-based layer of programmatic. They still use the OpenRTB protocol, but access is restricted. There are three primary sub-types:
| Deal Type | Guaranteed? | Price | Access | | :--- | :--- | :--- | :--- | | Private Marketplace (PMP) | No | Floor price, auction among invited buyers | Invite-only | | Preferred Deal | No | Fixed price, first look | Invite-only | | Direct Guaranteed / Programmatic Guaranteed (PG) | Yes | Fixed price, fixed volume | One-to-one contract |
Closed Auctions are transacted using a Deal ID embedded in the OpenRTB bid request. Only DSPs that have been granted access to that Deal ID can bid. This is the mechanism by which premium publishers protect their best inventory from the chaos of the open market.
This is the paradigm we will focus on for the remainder of this article. It is the only inventory type that combines the protocol openness of programmatic with the supply quality guarantees of direct media buying.
3. Why Inventory Type Is an Architectural Decision, Not Just a Media Decision
A common mistake in AdTech organizations is to treat inventory selection as a purely commercial or media-planning concern. The media team decides where to spend; the engineering team just "makes it work."
This separation is a fatal error for DSP builders.
Inventory type dictates system architecture. The three paradigms impose fundamentally different requirements on latency, throughput, data modeling, pacing logic, and reconciliation. If your DSP architecture treats a $5.00 guaranteed PMP deal the same way it treats a $0.30 open auction impression, your pacing algorithms will fail, your billing will be inaccurate, and your media planners will lose trust in the platform.
Let us examine the non-functional requirements each paradigm imposes:
3.1 Latency and Throughput
- Open Auction: Requires sub-30ms bid decisions at millions of queries per second (QPS). The bidding engine must be stateless and horizontally scalable.
- Closed Ecosystems: No real-time bidding. Throughput is constrained by API rate limits, not latency. Batch processing and eventual consistency are acceptable.
- Closed Auctions: Real-time bidding still applies (because the transport is OpenRTB), but the decision logic is different. You are not deciding "should I bid?" from scratch; you are deciding "how do I pace against a guaranteed commitment?"
3.2 Data Modeling
- Open Auction: Ephemeral, high-volume event streams. Data is optimized for write throughput and time-series aggregation (ClickHouse, Druid).
- Closed Ecosystems: Campaign and performance metadata. Data is optimized for reconciliation against external platform reports.
- Closed Auctions: Contractual metadata. You must model deals, floors, guarantee volumes, flight dates, and delivery commitments. This requires transactional integrity (PostgreSQL) alongside real-time event tracking.
3.3 Pacing Logic
This is the most underappreciated architectural differentiator.
- Open Auction: Pacing is "best effort." You spend until the budget is exhausted, with no guarantee of delivery.
- Closed Ecosystems: The platform controls pacing. You set a budget and the platform decides how to spend it.
- Closed Auctions: Pacing is contractually obligated. If you committed to delivering 10 million impressions for a Direct Guaranteed deal, your pacing engine must ensure those impressions are delivered within the flight window, without over-delivering (which wastes budget) or under-delivering (which breaches the contract).
This distinction alone requires a dedicated Forecasting and Pacing Engine that is architecturally separate from your open-auction bidding engine.
4. Deep Dive: Open Auction Inventory — Scale Without Certainty
Let us be fair to open auctions before we critique them. They are the engine that made programmatic advertising possible. Without the open auction, there would be no standardized protocol, no real-time clearing, and no liquid market for digital ad impressions.
4.1 How Open Auctions Work (Architecturally)
The flow of an open auction bid request is as follows:
- A user loads a webpage or app.
- The publisher's ad server calls an SSP.
- The SSP broadcasts an OpenRTB bid request to connected DSPs.
- Each DSP evaluates the request against its targeting, budget, and bidding models.
- DSPs return bid responses within the timeout window (typically 100ms).
- The SSP runs an auction (now almost universally first-price) and returns the winning creative.
For a DSP, this pipeline looks like:
[API Gateway]
→ [Kafka Ingestion]
→ [Pre-Bid Filter (Redis)]
→ [Bidding Engine (Go/Rust)]
→ [Bid Shading / Pacing Check]
→ [Bid Response]
4.2 The Compute Problem
The defining characteristic of open auction inventory is asymmetric compute cost. You receive millions of bid requests, but you can only afford to deeply evaluate a fraction of them. Every additional model inference, every additional database lookup, costs money at scale.
This forces DSPs to implement aggressive pre-bid filtering:
- Blacklists: Reject known-bad domains, apps, and sellers.
- Budget pacing checks: Reject requests when the campaign is pacing too fast.
- Geographic and device filters: Reject requests that do not match targeting.
- Frequency cap checks: Reject users who have already seen the ad.
Only the requests that survive these cheap, fast filters are passed to the expensive ML models for final evaluation.
4.3 The Cleanliness Problem
Here is the fundamental weakness of open auction inventory: it is structurally hostile to clean supply.
The open auction is an open market. Anyone can register as a seller. Anyone can spin up a domain, populate it with bot traffic, and offer it into the auction. The result is a supply chain riddled with:
- Invalid Traffic (IVT): Bot impressions, domain spoofing, data center traffic.
- Made-for-Advertising (MFA) sites: Low-quality content farms built solely to harvest ad impressions.
- Brand-safety violations: Adjacency to hate speech, misinformation, or harmful content.
- Supply path arbitrage: Multiple intermediaries taking fees, inflating the effective CPM while delivering no incremental value.
You can clean open inventory. The industry has built tools for it: DoubleVerify, IAS, HUMAN, and others provide pre-bid and post-bid verification. Blocklists can be maintained. Contextual AI can classify page content.
But here is the architectural reality: cleaning open inventory is a compute-intensive, ongoing, adversarial process. You are fighting a moving target. The bad actors adapt. Your blocklists become stale. Your detection models drift. The cost of maintaining clean open supply grows with scale.
For a DSP serving large media plans, this is a tax on every single impression. It is not a one-time setup cost; it is a perpetual operational burden.
4.4 The Pricing Problem
Since the industry-wide shift to first-price auctions, open auction pricing has become more transparent but also more complex. In a first-price auction, you pay what you bid. This eliminates the arbitrage opportunities of the old second-price world, but it introduces a new problem: bid shading.
If you bid your true value, you will systematically overpay. So DSPs implement bid-shading algorithms that estimate the minimum clearing price and bid slightly above it. This requires:
- Historical clearing-price data (stored in a time-series database like ClickHouse).
- Real-time prediction models.
- Continuous feedback loops to recalibrate as market conditions shift.
This is a significant engineering investment, and it is an investment that only pays off if you are buying enough open inventory to justify the model complexity.
4.5 The Verdict on Open Auction Inventory
Open auction inventory is necessary but insufficient for large-scale media planning. It provides unmatched scale and reach. But it cannot, on its own, provide the clean, predictable, brand-safe supply that enterprise advertisers demand.
This is the gap that closed auctions fill.
5. Deep Dive: Closed Ecosystems — The Walled Garden Problem
If open auctions are chaotic, walled gardens are the opposite: highly controlled, highly optimized, and highly opaque.
5.1 How Walled Gardens Work (Architecturally)
There is no real-time bidding in a walled garden. Instead:
- The buyer creates a campaign via the platform's API or UI.
- The buyer defines targeting, budget, and creative.
- The platform's internal ranking algorithms decide which users see the ad.
- The platform delivers the impressions and reports performance back via the API.
For a DSP, integrating with walled gardens means building API orchestration layers, not bidding engines. You are not making real-time decisions; you are managing campaign metadata and reconciling reports.
5.2 The Data Silo Problem
The most significant architectural limitation of walled gardens is that data does not leave the garden.
When you run a campaign on Meta, the performance data, the audience insights, and the conversion events all live inside Meta's systems. You can export aggregated reports, but you cannot:
- Combine Meta's user-level data with your own first-party data in a unified warehouse.
- Run cross-platform attribution without significant modeling and estimation.
- Port the learned audience segments to another platform.
For a DSP building a unified media planning layer, this is a serious constraint. You cannot build a single source of truth if half your data is locked inside proprietary platforms.
5.3 The Reconciliation Problem
Because you do not control the auction, you do not control the truth. Every walled garden reports impressions, clicks, and conversions using its own definitions and its own measurement methodology. These numbers rarely match your own tracking or third-party verification.
This creates a reconciliation problem that consumes significant engineering effort:
- You must ingest platform reports on a schedule (hourly, daily).
- You must normalize the data into your internal schema.
- You must resolve discrepancies between platform-reported and third-party-measured numbers.
- You must decide which source of truth to use for billing.
This is not a glamorous problem, but it is a critical one. Billing disputes over walled garden discrepancies can cost agencies and advertisers millions.
5.4 The Verdict on Walled Gardens
Walled gardens are unavoidable for large-scale media planning. Meta and Google together command the majority of digital ad spend. No serious DSP can ignore them.
But they are complementary, not foundational. They solve the reach and engagement problem. They do not solve the clean supply problem, the data portability problem, or the unified planning problem.
For a DSP builder, walled gardens are a set of API integrations and reconciliation pipelines. They are not the core of your architecture.
6. Deep Dive: Closed Auctions — The Clean Supply Imperative
Now we arrive at the heart of this article. If open auctions are chaotic and walled gardens are opaque, closed auctions are the structured, predictable, brand-safe middle path that large-scale media planning actually requires.
This section is the longest and most detailed, because it is the most important.
6.1 What Makes Closed Auctions "Clean"?
The cleanliness of closed auctions is not an accident. It is a structural property of how the deals are formed. Let us examine the mechanisms.
6.1.1 Curated Seller Lists
In an open auction, any seller can participate. In a closed auction, the publisher explicitly selects which buyers can access the deal. This means:
- The publisher has vetted the demand source.
- The publisher controls the floor price.
- The publisher can enforce brand-safety requirements as a condition of the deal.
This curation happens before the first impression is served. The supply chain is clean by design, not by after-the-fact filtering.
6.1.2 Deal IDs and Supply Path Integrity
Every closed auction deal is identified by a Deal ID in the OpenRTB bid request. This Deal ID is not just a label; it is a cryptographic and contractual anchor for the transaction.
When a DSP receives a bid request with a Deal ID, it knows:
- Which publisher the impression comes from.
- Which deal terms apply (floor price, guarantee, flight dates).
- Which supply path was used.
This enables supply path optimization (SPO). The DSP can verify that the impression arrived through an authorized, direct supply path, rather than through a chain of resellers. This is a powerful defense against supply path arbitrage and domain spoofing.
6.1.3 ads.txt, sellers.json, and the SupplyChain Object
The industry has built a set of transparency standards that work especially well in closed auctions:
- ads.txt: A file on the publisher's domain that lists authorized sellers. DSPs can verify that the seller in the bid request is authorized by the publisher.
- sellers.json: A file on the SSP that lists all sellers and their identities. This enables buyers to trace the full supply chain.
- SupplyChain Object (schain): A field in the OpenRTB bid request that carries the full chain of intermediaries from publisher to buyer.
In a closed auction, these transparency mechanisms are enforceable by contract. The publisher can require that all impressions carry a valid schain. The DSP can reject any impression that fails verification. This is a level of supply chain integrity that is extremely difficult to achieve in the open auction.
6.1.4 Reduced Invalid Traffic
Because closed auctions are curated and contracted, they are structurally resistant to invalid traffic:
- The publisher has a direct financial incentive to deliver clean impressions, because the deal is often guaranteed and the publisher's reputation is on the line.
- The buyer can require third-party verification (DoubleVerify, IAS) as a condition of the deal.
- The floor price creates a natural barrier to low-quality supply. Fraudulent inventory cannot sustain a $5.00 CPM floor.
Empirically, IVT rates in PMPs and Direct Guaranteed deals are significantly lower than in open auctions. This is not a coincidence; it is a consequence of the deal structure.
6.1.5 Brand Safety by Contract
In an open auction, brand safety is enforced by blocking: you maintain blocklists of bad categories, bad domains, and bad content. This is a negative-space approach: you define what you don't want, and hope the blocking is comprehensive.
In a closed auction, brand safety is enforced by inclusion: you define what you do want, and the deal is structured to deliver only that. The publisher can guarantee:
- Content category (e.g., news, sports, lifestyle).
- Content rating (e.g., no mature content).
- Adjacency controls (e.g., no ads next to user comments).
This is a fundamentally more reliable approach. It is easier to verify that an impression came from an approved publisher than to verify that it did not come from any of a million possible bad actors.
6.2 The Architecture of a Closed Auction Deal
Let us get concrete. How does a DSP actually implement closed auction support?
6.2.1 Deal Management Service
This is the system of record for all deals. It stores:
CREATE TABLE deals (
deal_id TEXT PRIMARY KEY,
publisher_id TEXT NOT NULL,
deal_type TEXT NOT NULL, -- 'PMP', 'PREFERRED', 'GUARANTEED'
floor_price DECIMAL(10,4),
fixed_price DECIMAL(10,4),
currency TEXT DEFAULT 'USD',
is_guaranteed BOOLEAN DEFAULT FALSE,
guaranteed_imps BIGINT,
start_date TIMESTAMPTZ,
end_date TIMESTAMPTZ,
status TEXT DEFAULT 'ACTIVE',
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE deal_buyer_access (
deal_id TEXT REFERENCES deals(deal_id),
buyer_id TEXT NOT NULL,
status TEXT DEFAULT 'INVITED', -- INVITED, ACTIVE, REVOKED
PRIMARY KEY (deal_id, buyer_id)
);
This service is the source of truth for deal terms. It must be highly available, because the bidding engine needs to query it on every relevant bid request.
6.2.2 Deal ID Resolution in the Bidding Engine
When a bid request arrives with a dealid, the bidding engine must:
- Parse the Deal ID from the OpenRTB
imp.pmp.dealsarray. - Resolve deal terms from the Deal Management Service (cached in Redis for low latency).
- Validate buyer access — confirm that this DSP is authorized for the deal.
- Check pacing — for guaranteed deals, verify that the campaign is not over- or under-delivering.
- Apply floor price — ensure the bid meets or exceeds the deal floor.
- Return the bid.
This is a fundamentally different decision path from the open auction. In the open auction, the question is "should I bid at all?" In the closed auction, the question is "how do I bid to satisfy the deal contract?"
6.2.3 Forecasting and Pacing Engine
This is the most complex component of closed auction support, and it is what separates a toy DSP from a production-grade one.
For a Direct Guaranteed deal, the DSP must answer:
- Forecasting: Given the deal's flight dates and the publisher's projected supply, how many impressions can we realistically deliver?
- Pacing: Given the current delivery rate, are we on track to hit the guaranteed volume by the end of the flight?
- Throttling: If we are pacing too fast, should we reduce our bid rate to avoid over-delivery?
- Make-good: If we are pacing too slow, should we increase our bid rate or negotiate additional inventory?
This requires a dedicated service, typically running a combination of:
- Batch forecasting jobs (overnight, using historical delivery data).
- Real-time pacing calculations (per-minute, comparing actual delivery to target delivery).
- Feedback control loops (adjusting bid rates based on pacing error).
Architecturally, this looks like:
[Delivery Events (Kafka)]
→ [Real-Time Aggregation (ClickHouse)]
→ [Pacing Calculator]
→ [Bid Rate Adjustment]
→ [Bidding Engine Config (Redis)]
The pacing calculator writes a "bid multiplier" or "throttle rate" into Redis, which the bidding engine reads on every request. This creates a closed feedback loop that keeps delivery on track.
6.2.4 Reconciliation Service
Even with a well-built pacing engine, there will be discrepancies between the DSP's counted impressions and the publisher's counted impressions. The Reconciliation Service:
- Ingests the publisher's delivery reports (typically via SFTP, API, or manual upload).
- Compares them against the DSP's internal counts.
- Flags discrepancies above a threshold (e.g., 2%).
- Generates make-good or credit recommendations.
This is a batch-oriented, data-heavy service. It does not need to be real-time, but it must be accurate and auditable.
6.3 The CTV Factor
One of the most important drivers of closed auction adoption is Connected TV (CTV).
CTV inventory is fundamentally different from display inventory:
- It is premium — major broadcasters, streaming services, and networks.
- It is scarce — there are far fewer CTV impressions than display impressions.
- It is expensive — CTV CPMs are significantly higher than display CPMs.
- It is brand-sensitive — advertisers care deeply about the content their ads appear alongside.
These properties make CTV a natural fit for closed auctions. Premium CTV publishers do not want their inventory in the open auction. They want curated buyers, guaranteed delivery, and brand safety. As a result, the vast majority of premium CTV inventory is transacted via PMPs and Programmatic Guaranteed deals.
For a DSP builder, this is a critical insight: if you want to serve CTV media plans, you must have first-class closed auction support. There is no viable alternative.
6.4 The First-Party Data Activation Story
Another major driver of closed auction adoption is first-party data activation.
Advertisers increasingly want to target their own customers and lookalike audiences across the open web. But they do not want to share their first-party data with every SSP and exchange in the open auction.
Closed auctions provide a solution:
- The advertiser shares its first-party data with a specific set of trusted publishers via a PMP.
- The publishers activate that data within their own environments.
- The transaction happens within the closed deal, with contractual data-use restrictions.
This is a privacy-compliant, brand-safe way to activate first-party data in a post-cookie world. It is one of the most compelling use cases for closed auctions, and it is a major reason why enterprise advertisers are shifting budgets out of open auctions and into PMPs.
7. The Economics of Clean Supply: Why "Clean" Is a Financial Metric
Let us step back from the architecture and talk about money, because at the end of the day, media planning is a financial discipline.
7.1 The True Cost of Dirty Inventory
When an advertiser buys open auction inventory at $2.00 CPM, they are not paying $2.00 per visible, brand-safe, human impression. They are paying $2.00 per delivered impression, which includes:
- A percentage of bot traffic (let's say 15%).
- A percentage of non-viewable impressions (let's say 40%).
- A percentage of brand-unsafe placements (let's say 5%).
The effective CPM — the cost per genuinely valuable impression — is much higher than the headline CPM. If only 40% of impressions are viewable, human, and brand-safe, the effective CPM is $5.00, not $2.00.
This is the hidden tax of dirty inventory. And it is a tax that compounds with scale. A $50 million media plan with a 60% waste rate is effectively burning $30 million.
7.2 The Closed Auction Premium
Closed auction inventory carries a premium. A PMP CPM might be $5.00 where the equivalent open auction CPM is $2.00. This premium is real, and it must be justified.
But here is the key insight: the closed auction premium is often cheaper than the open auction waste.
If the closed auction delivers 90% viewable, 99% human, 100% brand-safe impressions, the effective CPM is close to the headline CPM. You pay $5.00 and get $5.00 of value. In the open auction, you pay $2.00 and get $0.80 of value.
The closed auction is more expensive per impression but cheaper per unit of actual media value. This is the economic argument for clean supply, and it is the argument that wins budget conversations with CFOs.
7.3 The Predictability Premium
Beyond the waste calculation, there is a predictability premium.
Large media plans are built on forecasts. The media planner commits to delivering a certain number of impressions, a certain reach, a certain frequency, by a certain date. If the actual delivery deviates significantly from the forecast, the plan fails, and the agency may owe the advertiser a make-good.
Open auction delivery is inherently unpredictable. You cannot guarantee that you will win a specific number of impressions, because the auction is competitive and the supply is volatile.
Closed auction delivery, especially Programmatic Guaranteed, is contractually predictable. The publisher commits to delivering a specific volume. The DSP commits to buying it. The forecast becomes a contract.
This predictability has enormous value for media planning. It reduces the risk of make-goods, improves client relationships, and enables more ambitious campaign structures. It is a form of financial insurance that is baked into the deal structure.
8. DSP Architecture for Large-Scale Media Planning
Now that we have established the case for closed auctions, let us zoom out and look at the overall architecture of a DSP designed for large-scale media planning.
8.1 The Core Components
A production-grade DSP for enterprise media planning requires the following major subsystems:
- Campaign Management Service — the system of record for campaigns, line items, and creatives.
- Bidding Engine — the real-time decision engine that evaluates bid requests and returns bids.
- Deal Management Service — the system of record for closed auction deals (as described above).
- Forecasting and Pacing Engine — the delivery optimization system for guaranteed deals.
- Data Platform — the ingestion, storage, and analytics layer (Kafka, ClickHouse, PostgreSQL, Redis).
- Reporting and Reconciliation — the billing, measurement, and discrepancy resolution layer.
- Identity and Audience Service — the user resolution and targeting layer.
- Creative Management Platform (CMP) — the creative storage, optimization, and dynamic assembly layer.
8.2 The Bidding Engine: A Closer Look
The bidding engine is the heart of the DSP. For large-scale media planning, it must handle both open auction and closed auction traffic, with different decision logic for each.
A high-level pseudocode structure:
function handleBidRequest(request):
// 1. Fast pre-filters
if not passesBlacklist(request): return NO_BID
if not passesGeoFilter(request): return NO_BID
if not passesBudgetCheck(request): return NO_BID
// 2. Check for closed auction deals
deals = request.imp.pmp.deals
if deals is not empty:
return handleClosedAuction(request, deals)
else:
return handleOpenAuction(request)
function handleClosedAuction(request, deals):
for deal in deals:
dealTerms = resolveDeal(deal.id) // from Redis cache
if not isAuthorized(dealTerms): continue
pacingRate = getPacingRate(deal.id)
if random() > pacingRate: continue // throttle
bidPrice = calculateBid(dealTerms, request)
if bidPrice < dealTerms.floor_price: continue
return BID(bidPrice, deal.id)
return NO_BID
function handleOpenAuction(request):
user = resolveUser(request)
value = predictValue(user, request)
shadedBid = applyBidShading(value, request)
return BID(shadedBid)
Notice the structural difference: the closed auction path is deal-driven, while the open auction path is value-driven. This is not a minor implementation detail; it reflects the fundamental difference between contractual delivery and speculative bidding.
8.3 The Data Platform
The data platform must handle three distinct data patterns:
- High-velocity event streams (bid requests, bid responses, impressions) → Kafka → ClickHouse.
- Transactional metadata (campaigns, deals, contracts) → PostgreSQL.
- Low-latency lookups (user profiles, deal terms, pacing rates) → Redis.
The key architectural decision is separation of concerns. Do not try to use one database for all three patterns. ClickHouse is not a transactional database. PostgreSQL cannot handle millions of writes per second. Redis is not a system of record.
Use each technology for what it is best at, and connect them with well-defined data pipelines.
8.4 The Pacing Engine: The Hardest Problem
If I had to identify the single hardest engineering problem in building a DSP for large-scale media planning, it would be pacing.
Pacing is hard because it is a multi-objective, real-time optimization problem with:
- Hard constraints: Do not exceed the budget. Do not under-deliver on guaranteed deals.
- Soft constraints: Maximize value. Maintain consistent delivery throughout the flight.
- Uncertainty: Future supply is unknown. Auction competition is unknown.
- Scale: Millions of decisions per minute.
The state-of-the-art approaches involve:
- PID controllers for feedback-based pacing.
- Model predictive control (MPC) for forward-looking optimization.
- Reinforcement learning for adaptive bidding in dynamic markets.
Whichever approach you choose, the pacing engine must be separate from the bidding engine. The bidding engine makes per-request decisions. The pacing engine makes per-campaign, per-deal decisions over time. Conflating the two leads to brittle, unmaintainable systems.
9. Why Closed Auctions Dominate Modern Media Planning
Let us now synthesize the argument. Why, for a DSP builder focused on large-scale media planning, are closed auctions the dominant paradigm?
9.1 Clean Supply Is a Competitive Advantage
In a market where every DSP can access the same open auction inventory, clean supply is a differentiator. If your DSP can deliver measurably cleaner, safer, more viewable inventory than your competitors, you can command premium pricing and win enterprise accounts.
Closed auctions are the most efficient path to clean supply. They shift the burden of quality assurance from your engineering team (building and maintaining blocklists, fraud detection, brand safety classifiers) to the deal structure itself (curated sellers, contractual guarantees, floor prices).
This is not just an operational convenience; it is a strategic moat. The DSP that can reliably deliver clean supply will win the budgets that matter most.
9.2 Enterprise Advertisers Demand Predictability
Large media plans are built on commitments. The advertiser commits a budget. The agency commits to delivering specific outcomes. The DSP must deliver on those commitments.
Open auctions cannot guarantee delivery. Closed auctions can.
For a DSP serving enterprise clients, the ability to guarantee delivery is table stakes. Without it, you are relegated to the performance-marketing long tail, where margins are thin and churn is high.
9.3 The Shift to CTV and Premium Video
As discussed earlier, premium CTV inventory is overwhelmingly transacted via closed auctions. The fastest-growing segment of digital advertising is also the most closed-auction-dependent.
A DSP without first-class closed auction support is structurally excluded from the CTV market. Given that CTV is where the premium budgets are flowing, this is a disqualifying limitation.
9.4 The Post-Cookie Reality
The deprecation of third-party cookies and the rise of privacy regulations (GDPR, CCPA) have made open auction targeting increasingly difficult. Contextual targeting and privacy-safe identity solutions (UID2, EUID) are emerging, but they are still maturing.
Closed auctions offer a privacy-compliant path forward. First-party data can be activated within curated deals, with contractual data-use restrictions. This is a more sustainable model than the cookie-dependent open auction.
9.5 The Consolidation of Premium Supply
The industry trend is clear: premium publishers are pulling their best inventory out of the open auction. They are moving it into PMPs and Programmatic Guaranteed deals to protect their yields and their brand relationships.
This means the open auction is increasingly a market for remnant inventory — the supply that publishers could not sell through closed channels. As a DSP builder, you must recognize that the best supply is no longer in the open auction. It is in the closed deals.
10. Implementation Playbook: Building Closed-Auction Capability Into Your DSP
If you are convinced of the thesis, the next question is: how do you actually build this? Here is a phased implementation playbook.
Phase 1: Foundation (Months 1–3)
Goal: Establish the core closed auction infrastructure.
- Deal Management Service: Build the system of record for deals. Implement CRUD operations for deals, buyer access, and deal terms.
- Deal ID Parsing: Update the bidding engine to parse
imp.pmp.dealsfrom OpenRTB bid requests. - Basic Deal Filtering: Implement authorization checks (is this DSP allowed to bid on this deal?).
- Floor Price Enforcement: Ensure bids meet or exceed the deal floor.
Phase 2: Pacing and Forecasting (Months 4–6)
Goal: Enable reliable delivery for guaranteed deals.
- Forecasting Engine: Build batch jobs that predict available supply for each deal based on historical delivery data.
- Pacing Engine: Implement real-time pacing calculations with feedback control loops.
- Throttling: Add bid-rate throttling to prevent over-delivery.
- Delivery Dashboards: Build internal tooling for media planners to monitor delivery against targets.
Phase 3: Reconciliation and Billing (Months 7–9)
Goal: Close the financial loop.
- Publisher Report Ingestion: Build pipelines to ingest publisher delivery reports.
- Discrepancy Detection: Implement automated comparison between DSP counts and publisher counts.
- Make-Good Workflows: Build tooling to negotiate and execute make-goods for under-delivery.
- Billing Integration: Connect the reconciliation outputs to the billing system.
Phase 4: Advanced Features (Months 10–12)
Goal: Differentiate on capabilities.
- Supply Path Optimization: Implement schain validation and supply path analysis.
- First-Party Data Activation: Build the pipelines for activating advertiser data within curated deals.
- Dynamic Deal Creation: Enable programmatic creation and modification of PMP deals via API.
- Cross-Deal Optimization: Build algorithms that optimize budget allocation across multiple closed auction deals.
11. Observability, Metrics, and Reconciliation
A DSP for large-scale media planning must be observable. When a guaranteed deal under-delivers by 20%, you need to know why, and you need to know within hours, not days.
11.1 Key Metrics to Track
Delivery Metrics:
- Impressions delivered vs. impressions committed (per deal).
- Pacing rate (actual delivery / expected delivery).
- Bid rate and win rate per deal.
Quality Metrics:
- Viewability rate per deal.
- Invalid traffic rate per deal.
- Brand safety violation rate per deal.
Financial Metrics:
- Effective CPM (after accounting for waste).
- Discrepancy rate (DSP vs. publisher counts).
- Make-good volume and cost.
System Metrics:
- Bidding engine latency (p50, p95, p99).
- Deal resolution latency (Redis hit rate).
- Kafka consumer lag.
- ClickHouse query performance.
11.2 The Observability Stack
A production-grade observability stack for a DSP includes:
- Metrics collection: Prometheus or a similar time-series metrics system.
- Logging: Structured logging with correlation IDs, aggregated in a log platform (Elasticsearch, Loki, or a cloud-native equivalent).
- Tracing: Distributed tracing (OpenTelemetry) to follow a bid request through the entire pipeline.
- Alerting: PagerDuty or equivalent, with alerts on delivery anomalies, latency spikes, and error rate increases.
11.3 The Reconciliation Workflow
Reconciliation is not a one-time process; it is a continuous operational discipline. A typical workflow:
- Daily ingestion of publisher reports.
- Automated comparison against DSP counts.
- Exception flagging for discrepancies above threshold.
- Human review of flagged exceptions by the ad operations team.
- Resolution via make-good, credit, or dispute.
- Documentation for audit and future reference.
This workflow must be automated as much as possible. At enterprise scale, you cannot manually reconcile thousands of deals. The system must surface only the exceptions that require human judgment.
12. The Future: Supply Chain Transparency and the Closed-Auction Renaissance
Let us close with a look at where the industry is heading.
12.1 The Rise of Supply Chain Transparency
The industry is moving toward greater supply chain transparency, driven by:
- Regulatory pressure: Privacy regulations and antitrust scrutiny are forcing more transparency.
- Advertiser demand: Enterprise advertisers are demanding to know where their money is going.
- Standards adoption: ads.txt, sellers.json, and the SupplyChain Object are becoming table stakes.
This trend favors closed auctions, which are inherently more transparent than open auctions. In a closed auction, the supply chain is short, curated, and contractually defined. In an open auction, the supply chain can involve dozens of intermediaries, each taking a fee and adding opacity.
12.2 The Consolidation of Programmatic Guaranteed
Programmatic Guaranteed (PG) is the fastest-growing segment of closed auction inventory. It combines the predictability of direct buying with the efficiency of programmatic delivery.
As PG matures, we will see:
- Standardized PG contracts: Reducing the friction of deal negotiation.
- Automated PG workflows: Enabling programmatic creation and modification of guaranteed deals.
- Cross-platform PG: Enabling guaranteed buys that span multiple publishers within a single deal.
This consolidation will further shift premium budgets toward closed auctions.
12.3 The AI-Driven Future
Machine learning will play an increasing role in closed auction optimization:
- Predictive forecasting: More accurate supply forecasts using deep learning.
- Dynamic pricing: Real-time adjustment of floor prices based on demand signals.
- Cross-deal optimization: AI-driven allocation of budget across multiple closed auction deals to maximize overall plan performance.
The DSPs that invest in these capabilities will have a significant competitive advantage.
12.4 The Strategic Imperative
The strategic imperative for DSP builders is clear:
The future of premium programmatic is closed. The open auction will continue to exist, but it will increasingly serve the long tail of remnant inventory. The premium budgets, the brand-safe environments, the predictable delivery — all of it will flow through closed auctions.
A DSP that is not built for closed auctions is a DSP that is built for the past.
13. Conclusion
Let us return to the question that opened this article: for a team building a DSP to support large-scale media planning, which inventory paradigm matters most?
The answer is not that open auctions are unimportant, or that walled gardens can be ignored. They are both essential components of a complete media plan. But they are complementary, not foundational.
The foundation is the closed auction.
Closed auctions provide:
- Clean supply by structural design, not by after-the-fact filtering.
- Predictable delivery through contractual guarantees.
- Brand safety through inclusion rather than exclusion.
- First-party data activation in a privacy-compliant framework.
- Access to premium CTV and other high-value inventory.
For a DSP builder, this translates into a clear architectural mandate:
- Build a robust Deal Management Service as the system of record for closed auction deals.
- Implement deal-aware bidding logic that treats closed auction requests differently from open auction requests.
- Invest heavily in the Forecasting and Pacing Engine — this is the hardest and most valuable component.
- Automate reconciliation to keep billing accurate and disputes minimal.
- Design for supply chain transparency with ads.txt, sellers.json, and schain validation.
The open auction gave us scale. The walled gardens gave us engagement. But the closed auction gives us trust — and trust is the currency of large-scale media planning.
Build for the closed auction, and you build for the future.