frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

ASK HN: Designing a DSP architecture for 1M QPS CPM ads without overspending

1•charzlie•2d ago
I’m working on the system architecture for a high-throughput AdTech DSP and would love feedback from people who’ve built large-scale bidding / serving systems.

Constraints / Goals

DSP only (no exchange)

Target: 1M ad requests/sec

End-to-end DSP latency budget: ~100ms

Pricing model: CPM

Hard requirement: no advertiser or campaign overspend

Targeting / Campaign Fetch

I modeled targeting (geo, interests, etc.) using Redis + Roaring Bitmaps.

Fetching candidate campaigns alone:

Redis: ~1000 RPS at ~8ms (local machine, not cloud)

Aerospike: ~200–400 RPS at ~10ms

This is only campaign fetching, not bidding or scoring.

Budget / Wallet Model

Advertiser has a wallet

Campaign has:

Total budget

Daily budget

Daily spend tracking

Overspend is not acceptable (even a small % matters at scale).

Budget Control Approaches Considered

Splitting daily budgets into hourly buckets

Rate limiting via:

Token bucket

PID controllers

These reduce overspend but don’t guarantee correctness under bursty traffic.

Recently considering micros (integer currency units) to reduce rounding errors.

Open Questions

At 1M QPS, how do people actually enforce budget guarantees in production?

Soft overspend with reconciliation?

Hard atomic checks in the hot path?

Is Redis bitmap–based targeting viable at this scale, or does everyone eventually:

Pre-materialize campaign sets?

Push logic into memory / C++?

How do you balance:

Strict budget enforcement

Low latency

High throughput without introducing global locks or cross-region contention?

Is “no overspend ever” a realistic requirement, or is bounded error the industry norm?

I’m less interested in textbook answers and more in what has actually worked (or failed) in production.

Mister Mxyzptlk

https://en.wikipedia.org/wiki/Mister_Mxyzptlk
1•rolph•47s ago•0 comments

Antigravity prompt injection: Read browser local storage remotely

https://introvertmac.wordpress.com/2025/12/15/ai-ide-prompt-injection-reading-browser-local-storage/
2•introvertmac•2m ago•0 comments

Detailed balance in large language model-driven agents

https://arxiv.org/abs/2512.10047
1•gmays•3m ago•0 comments

Multiple Threat Actors Exploit React2Shell (CVE-2025-55182)

https://cloud.google.com/blog/topics/threat-intelligence/threat-actors-exploit-react2shell-cve-20...
1•gnabgib•3m ago•0 comments

Dictionary of Canadianisms on Historical Principles 3rd Edition

https://dchp.arts.ubc.ca/
1•cf100clunk•4m ago•1 comments

The appropriate amount of effort is zero

https://expandingawareness.org/blog/the-appropriate-amount-of-effort-is-zero/
2•gmays•5m ago•0 comments

Be a Problem-Solver Not a Politician

https://mo42.bearblog.dev/be-a-problem-solver-not-a-politician/
1•speckx•5m ago•0 comments

How iMessage sends and receives messages securely

https://support.apple.com/guide/security/how-imessage-sends-and-receives-messages-sec70e68c949/web
1•CharlesW•5m ago•0 comments

Show HN: Built a tool to allow chatting with SEC filings

https://github.com/ralliesai/tenk
1•rallies•5m ago•0 comments

Show HN: Enabling Agentic Commerce Protocol (ACP) for Shopify Stores

https://www.actory.ai/
1•afrederico•6m ago•0 comments

Fortescue Infinity Train 14.5 MWh battery that never needs charging [update]

https://electrek.co/2025/12/15/fortescue-infinity-train-electric-locomotive-never-needs-fuel-or-c...
1•Bender•7m ago•0 comments

China, Iran are having a field day with React2Shell, Google warns

https://www.theregister.com/2025/12/15/react2shell_flaw_china_iran/
1•Bender•7m ago•0 comments

What's behind the battle between The Mission District and SF tech companies

https://www.sfchronicle.com/bayarea/article/doordash-delivery-drone-21239843.php
1•mikhael•8m ago•0 comments

Ask HN: Bloggers, how do you manage your content?

1•freemanjiang•9m ago•0 comments

Show HN: Build ML training datasets from large-scale satellite/aerial imagery

https://github.com/noahgolmant/label-tiles
1•noahgolmant•10m ago•0 comments

A visual editor for the Cursor Browser

https://cursor.com/blog/browser-visual-editor
1•evo_9•10m ago•0 comments

Improving Emacs Screenshots

https://mbork.pl/2025-12-15_Improving_Emacs_screenshots
1•speckx•12m ago•0 comments

Surveyi – RTXI Real Time Experience Intelligence

https://surveyi.app/
1•dickiedogbrands•12m ago•1 comments

Show HN: I made an LLM-powered CRO tool

https://crovise.netlify.app/
1•adamoufkir•13m ago•1 comments

Google discontinuing their dark web report

https://support.google.com/websearch/answer/16767242?hl=en&co=GENIE.Platform%3DAndroid
7•ortusdux•15m ago•1 comments

What changes when agent routing is fully deterministic?

1•balachandarmani•16m ago•0 comments

Origins of the TPC and the first 10 years

https://www.tpc.org/information/about/history5.asp
1•b-man•16m ago•0 comments

context—Odin’s Most Misunderstood Feature

https://www.gingerbill.org/article/2025/12/15/odins-most-misunderstood-feature-context/
1•davikr•18m ago•0 comments

Ukraine hits Russian submarine with underwater drones

https://www.euronews.com/2025/12/15/ukraine-hit-russian-submarine-with-underwater-drones-for-the-...
4•vinnyglennon•18m ago•0 comments

Show HN: A participation-weighted cryptocurrency prototype (Anvil)

https://github.com/AnonMoon64/Anvil
1•VexAnvil•19m ago•1 comments

Show HN: VibeCoCo – Plan your project, get a custom MCP server for your AI agent

https://vibecoco.app/demo
1•rjboadi•19m ago•0 comments

Show HN: Minimal tool for fast image and video device mockups

https://mock-magic-pro-site.vercel.app/
1•simonblok•21m ago•0 comments

Crypto mogul aims to build Caribbean utopia outside local courts

https://www.cryptopolitan.com/crypto-mogul-aims-to-build-caribbean-utopia/
2•wjb3•23m ago•0 comments

Automate Compliance with Riftur

https://5iprojects.com/mind-the-gap-iii-riftur-demo-519a2ce12a74
1•jcitsme•24m ago•0 comments

AI Is About to Empty Madison Avenue

https://www.wsj.com/opinion/ai-is-about-to-empty-madison-avenue-58ab2ea2
2•bookofjoe•24m ago•1 comments