Ad tech took margin from publishers for two decades in exchange for convenience. The convenience was real. So was the margin. With edge compute and first-party data rules tightening, the trade is worth renegotiating: publishers can now run their own ad decisioning at the edge, on infrastructure they control.

Why the edge changes the economics

An ad server is mostly a low-latency decisioning loop: match request context to eligible campaigns, apply pacing and frequency rules, return a creative. That loop fits comfortably inside a Worker with campaign state in KV and counters in Durable Objects. No origin fleet, no per-impression vendor fee, no data leaving your domain. The fixed cost of running your own stack collapsed from 'ad-ops team plus infrastructure team' to 'one system you operate.'

First-party means the targeting signal is your own logged-in and contextual data, not a third-party graph. That's not a limitation anymore — it's the only durable position. Contextual plus first-party behavioral covers the majority of what publishers actually sold, without the consent-management nightmare.

What we learned operating one

Frequency capping is where naive implementations die: per-user counters are a write-amplification problem at impression scale. Durable Objects with periodic flush to D1 handle it if you accept eventual consistency at the margins — and advertising tolerates approximate caps far better than engineers assume.

Direct-sold first, programmatic as backfill. The order matters: the system's job is to maximize the inventory your sales team sells, not to recreate an exchange. Build the decisioning you need, measure honestly, and keep the data.