Production platform / Real-time decisioning
Real-time platform for buying and selling traffic
- Context
- Traffic context, partner terms and monetization options had to become executable routing decisions under configurable business constraints.
- Engineering decisions
- Separated online serving from policy calculation. Combined continuous traffic splitting and experimentation with versioned policy snapshots and asynchronous financial feedback.
- My role
- Owned the mathematical logic, system architecture, service boundaries and data contracts; implemented key components and led engineering.
- Outcome
- A production platform for buying and selling traffic serving up to 60M users per day, 20+ events per user — over 1.2B events per day, about 14K requests per second on average at the event-ingestion layer.
Technical detail
Runtime uses source, GEO, device and other request signals to select a route, scenario or offer. Fallback and waterfall choices belong to the decision contract, so selection remains separate from the rendering of a destination. The runtime applies a published policy; it does not recompute financial models for each visitor.
The control loop combines events, conversion postbacks, acquisition cost and revenue. Segment-level calculations compare monetization options and publish the next policy snapshot. Versioned snapshots and explicit data contracts make the applied rules identifiable and decisions reproducible without introducing an analytical query into every request.
Continuous experimentation retains an exploration share for alternatives while reallocating traffic. This lets the platform respond when relative yield changes rather than permanently locking into one previously successful option. Acquisition and monetization decisioning operates under configurable business constraints, including minimum ROI thresholds.
Event pipeline: edge → Go ingest on Cloud Run → Pub/Sub with an Avro schema and DLQ → BigQuery ELT views and marts, with versioned event contracts. Continue/offer tokens are HMAC-signed via Cloudflare Workers; affiliate postbacks use token auth and deduplication.
Traffic quality: zone blocking; a daily check of network-reported clicks against own entry events in BigQuery; user-agent bot flagging; hashed IPs; click and conversion deduplication.
Platform scale: up to 60M users per day, each generating 20+ events — over 1.2B events per day, which is roughly 14K requests per second on average at the event-ingestion layer.
Online request path
- Request signals
- Runtime + policy snapshot
- Route / offer / fallback
Asynchronous feedback & control
- Events & postbacks
- Costs, revenue & forecasts
- Policy calculation → snapshot
Runtime applies a published policy to incoming traffic. Events and partner feedback feed analytics and policy calculation asynchronously; BigQuery is not a synchronous dependency of each request. This is a logical view, not a physical topology.
