By Flavio Porri, Head of Onetag Data Science
n digital advertising, optimizing latency and throughput can significantly impact performance and revenue. For a programmatic exchange, optimizing every bit of traffic that flows through its pipes isn’t just a matter of efficiency, it’s a matter of survival. Traffic shaping is the process of managing and prioritizing bid requests in real time to improve efficiency, control costs, and enhance revenue outcomes.
This document outlines our approach to building a traffic shaping system, key implementation challenges, and the resulting performance gains.
The Problem: Scale Without Strategy Is a Liability
At scale, ad requests are overwhelming. Our Exchange handles over 170 billion bid requests daily from publishers around the globe. However, not every request carries equal value. Some originate from high-converting placements, while others are noise in the system reducing efficiency, consuming bandwidth, and costing money in cloud egress and compute.
The previous approach of sending all traffic and relying on buyers to filter became inefficient. Buyers demanded quality over quantity. Costs for infrastructure were ballooning. And internal teams faced an uphill battle trying to tune performance across a sprawling system.
Laying the Groundwork: What Does “Shaping” Mean?
Traffic shaping in this context means intelligently deciding which requests to process, prioritize, or drop entirely based on their historical value, potential yield, or strategic importance.
The core goals are:
- Reduce waste: Eliminate low-value requests before they hit downstream systems.
- Improve performance: Ensure high-value traffic is prioritized and delivered faster.
Achieving this requires the solving of various industry challenges.
Random Throttling vs Smart Throttling
There is a clear disadvantage for all parties when traffic is randomly throttled. As data scientists, we understand the implications statistically, but when communicating with stakeholders, we find the following analogy particularly effective.
Imagine a bag full of beans, representing incoming traffic. Half of the beans are spoiled, they symbolize garbage traffic. Now, suppose you must deliver beans to a buyer who only needs a small, fixed number, say, 10 beans.
In this scenario, a Random Throttler is like handing the entire bag to the buyer and letting them pick a handful at random. On average, they’ll end up with 10 beans, but since half are spoiled, only 5 will be usable.
By contrast, a Smart Throttler selectively picks out 10 good beans and delivers them directly to the buyer.
This smarter approach has multiple benefits:
- We remain within the QPS limit, and buyers receive high quality impressions.
- We avoid processing traffic that provides low quality and value.
- Most importantly, since only good beans (quality traffic) drive revenue, we increase revenue – increasing winrates and access to quality impressions – even while reducing total traffic volume.
Simulations using our data have confirmed that smart throttling consistently outperforms random throttling, both in efficiency and revenue outcomes.
The plot below qualitatively illustrates this outcome: across all levels of blocked traffic, the Smart Throttler outperforms the Random Throttler in terms of revenue per second, even in the region to the left of the QPS limit, where we still rely in part on the buyer’s own random throttling.

Key Challenges Solved by Advanced Traffic Shaping
1. Signal Quality
With advanced traffic shaping, critical real-time decisions are made on supply using a combined data approach. Its algorithms need to predict value across an array of data signals and the combination of probabilistic modeling and historical data mining.
2. Latency Sensitivity
Advanced traffic shaping cannot afford added processing time. Traffic shaping logic has to execute in microseconds, integrated deep in the request pipeline, without degrading performance.
3. Granular Inventory Metadata
The attributes of ad placements across the open internet constantly change including their time-in-view, ads-to-content ratio, ad refresh and other factors. Traffic shaping involves sell-side decisioning on highly granular placement level metadata, to ensure problematic placements are removed and hidden impression quality is unlocked for buyers.
4. Continuous Learning
Markets shift, buyer behavior evolves, seasonal trends emerge – and most practically in terms of supply, the attributes of ad placements are constantly changing. Traffic shaping algorithms cannot be static and need to incorporate feedback loops, real-time learning, and continuous retraining to deliver their full potential
The Onetag Adaptive Scoring Engine
The Onetag Engineering team has built a modular traffic shaping engine based on an off-line scoring system. Each incoming bid request is evaluated using pre-cached predictions from a model that considered:
- Publisher quality metrics
- Historical CPMs and fill rates
- Ad context information
- Geolocation and device type
- Buyer-specific preferences
A scoring threshold dynamically adjusts based on system load, inventory constraints, and market conditions. Requests below the threshold are deprioritized or dropped, while high-scoring requests are fast-tracked for bidding.
To ensure fairness, the system includes feedback loops: if a buyer’s performance improves, their traffic share re-calibrates. These models are evaluated and retrained daily using a streaming data pipeline.
The Payoff: Tangible Gains Across the Board
The positive impact of advanced traffic shaping is immediate and measurable.
Infrastructure Efficiency
Compute and bandwidth costs drop significantly whilst delivering improved revenue performance for publishers and buyers.
Buyer Satisfaction
Buyers see improved winrates and better match quality, especially for curated deals. We have also seen demand partners disable their own smart throttling system in favor of our traffic shaping algorithm.
Agility
The Engineering team introduces new optimization strategies directly (e.g. addressing emerging market needs such as sustainability-conscious advertisers) without a need to overhaul the entire pipeline.
What’s Next: Traffic Shaping for the Quality Outcomes era
Traffic shaping is the foundational layer of sell-side decisioning for the media curation process. Its performance improvements for buyers and publishers will only grow as algorithms are trained on larger volumes and new types of data.
Crucially, this will start to include business outcomes signals. These are data that until now have analyzed only on the buy side, where they have increasingly struggled to optimize at scale due to signal loss in the bidstream.
As supply-side data intelligence continues to advance, traffic shaping will become even more powerful – helping to make the open internet work smarter, faster, and more effectively for everyone.
Originally Published on: LinkedIn