Real-time bidding and OpenRTB bidder development in Go
DSP bidders that answer inside the auction window, every time.
A bidder has one job and very little time to do it. The exchange sends a request, and if your response isn't back before the timeout, you didn't bid. It doesn't matter how smart your targeting is. That's why I build bidders in Go and design them around the latency budget first and the features second.
What I've built
At Advergic I built and run our DSP bidder service in Go, speaking OpenRTB 2.x with a sub-200ms latency target. The bid endpoint runs as an eight-stage pipeline:
- Request validation and early rejection of traffic we'd never bid on
- Parallel data fetches for user, device and campaign context
- Campaign lookup from an in-memory store
- A targeting pipeline with fourteen filters, ordered so the cheap ones run first
- An auction step with three pricing models and a stack of bid multipliers
- Creative selection
- Response delivery
- Async analytics through Kafka into ClickHouse, kept off the hot path
Where bidders usually go wrong
Most slow bidders I've looked at have the same few problems:
- Timeouts that add up. Each downstream call gets its own timeout, and nobody checks whether they fit inside the total budget together.
- Work that ignores the request deadline. Background contexts in Go keep running after the exchange has already moved on, burning CPU on bids that can't win.
- Filters in the wrong order. An expensive or cache-dependent check sitting at the front of the pipeline, so a cache hiccup turns into a bid drop.
- Logging and analytics in the request path. Writes to a database or queue that should be fire-and-forget.
- Features that quietly don't work. Frequency caps or pacing logic that exist in code but never actually block anything.
Fixing these usually means profiling the real request path, giving each stage a share of the budget, wiring the request deadline through every call, and moving anything that isn't needed for the response out of the way.
How I can help
- Building a new OpenRTB bidder or DSP backend from scratch
- Auditing an existing bidder for latency, timeouts and bid loss
- Adding targeting, pacing, frequency capping or new pricing models
- Setting up the Kafka to ClickHouse pipeline for bid and win reporting
- Evolving a bidder toward an exchange or hybrid setup
Got a bidder that's timing out or losing auctions?
Email haiderzamanusafxay@gmail.com with your setup and the numbers you're seeing, and I'll tell you where I'd look first.