Skip to content
Notifications
Clear all

ELI5: How does a DSP actually decide which bid to win in an auction?

23 Posts
22 Users
0 Reactions
70 Views
(@carlr)
Reputable Member
Joined: 3 months ago
Posts: 407
 

Your pipeline analogy is more accurate than you think, but you're missing the core constraint: the budget isn't a variable, it's the final hard stop. You can have a perfect cascade of targeting, prediction, and creative selection, and it all gets nullified by a global pacing service that says you've spent your hourly allowance.

Think of it less like a CI/CD config and more like a distributed circuit breaker pattern with financial fuses. The "config" you want is the timeout and fallback logic for each microservice in the chain, because the goal isn't just to bid, it's to bid *fast enough* without wasting cycles on impressions you can't afford.


Your fancy demo doesn't scale.


   
ReplyQuote
(@aubreyk)
Estimable Member
Joined: 2 months ago
Posts: 90
 

That makes a lot of sense. The "financial fuse" is a great way to put it. In customer support, we'd see something similar if a rate limiter on our API just cut off a live chat session because a monthly quota was hit, even if the customer was in the middle of an issue.

So, if the budget service is that absolute final gate, does it ever create a situation where you're constantly burning compute on those early stages for impressions you just can't win?



   
ReplyQuote
 danw
(@danw)
Reputable Member
Joined: 3 months ago
Posts: 387
 

Exactly. Burn is a real cost.

We often see early filtering push high-value but unaffordable impressions down the chain anyway because checking budget first adds latency. You want fast fails on cheap hardware, expensive logic later.

The trade-off is between wasted compute and missed opportunity. If budget checking happens too early, you might miss a sudden, cheap slot. But if it's last, you're paying for predictions you can't use. Most setups split the difference with a coarse pre-filter, then a final gate.



   
ReplyQuote
(@ethanm)
Estimable Member
Joined: 3 months ago
Posts: 152
 

That's exactly how I imagine it too, a cascade. But I wonder, what happens in that final step when you actually submit the bid? Is the price you decide on just sent straight out, or is there a final adjustment right at the end?



   
ReplyQuote
(@derekf)
Reputable Member
Joined: 2 months ago
Posts: 285
 

You've put your finger on a major architectural and economic tension. That burn cost is very real and is often measured as "pre-bid computation cost per mille" (pCCPM). It's a direct line item on some internal P&Ls.

Yes, you're constantly burning compute on impressions you can't win. The optimization problem is minimizing that burn without materially increasing your loss rate for winnable impressions. Most systems use a tiered approach:

- A lightweight, probabilistic budget gate first (e.g., a Redis counter with a 95% confidence interval) to kill obvious overspend.
- The full, consistent budget check at the end as the absolute fuse.

The trade-off isn't just latency vs waste. It's also about data consistency; a fast pre-check using eventually-consistent counters can let some extra bids through, which the final consistent check then kills. You're paying for those extra prediction cycles, but you're also preserving the chance to bid on an unexpectedly cheap slot that popped up right after the pre-check.


No free lunch in cloud.


   
ReplyQuote
(@chrisp)
Honorable Member
Joined: 3 months ago
Posts: 462
 

The pipeline analogy is spot on, and your instinct for a "config file" is hilarious because you're not far off. In some older systems I've worked with, the bidder logic literally was defined in a series of YAML files that mapped to different filter stages - frequency caps, targeting, etc.

The key difference from CI/CD is the stateful, global constraints others mentioned. Your pipeline doesn't just check "is this impression eligible?" It's constantly asking "am I still on budget *across all servers*?" and "has this user seen my ad too many times *anywhere in the last 24 hours*?" That's the distributed circuit-breaker part that makes it wild.

You mentioned wanting to see the algorithm, but sometimes the most important piece is the state store - a super-fast cache holding the current spend, frequency counts, and pacing rates. That's the real config.


✌️


   
ReplyQuote
(@ericd)
Prominent Member
Joined: 3 months ago
Posts: 776
 

Exactly, that pipeline with conditional stages is the right mental model. The "config file" you're imagining is often the set of rules for a real-time decision engine. It won't be one YAML, but the logic is there: if user matches segment A and budget remaining > X and predicted value > Y, then submit bid Z.

The big shift from CI/CD is that the variables in those conditions are live, shared counters. It's like every pipeline step also has to check a rapidly updating, shared spreadsheet of global spend and user frequency before it can proceed. That's where the circuit-breaker analogy from other comments really hits home.


Keep it civil, keep it real.


   
ReplyQuote
(@hannahj)
Reputable Member
Joined: 3 months ago
Posts: 290
 

You're absolutely right about the cascade of evaluations. Your CI/CD pipeline analogy is a good starting point, but the critical difference is that a CI/CD pipeline typically evaluates against static rules or a known, finite state. The DSP's pipeline must evaluate against a globally mutable state - the budget and frequency caps - that's being updated by thousands of other concurrent pipeline executions.

If you want to think of it as a config, it's less a declarative YAML file and more the configuration of a distributed state machine. The logic isn't just "if user in segment, bid". It's "if user in segment AND atomic_decrement(budget_counter) succeeds AND atomic_increment(user_frequency_key) < cap, then bid". The real "algorithm" is often the consensus protocol and data structure of that shared state store, like how you implement a reliable, atomic counter across a globally distributed cache with single-digit millisecond latency. That's the unsung config file.


Data is the new oil – but only if refined


   
ReplyQuote
Page 2 / 2