· Junsung Park (CEO) · Technology · 6 min read
How to Measure Gate Processing Cost Correctly: Separating the Shedding Effect from Overhead
In the previous two posts we talked about the time-bound gate that blocks requests whose residence time has grown too long. One question remains: "What is the compute cost — the overhead — of passing through that gate?"

In the previous two posts we talked about the time-bound gate that blocks requests whose residence time has grown too long. One question remains: “What is the compute cost — the overhead — of passing through that gate?”
This post is the record of falling into a trap while trying to measure that cost, and then correcting the mistake. It is not a boast about product performance, but a story about the right methodology for measuring performance.
We turned the gate on — and it got faster?
Measuring the gate’s overhead looked simple. On the same binary, use a feature flag to run the gate-on side and the gate-off side under the same load conditions, and compare processing time. But the result was strange. The gate-on side came out about 18% shorter in processing time than the gate-off side.1
At first blush that sounds like good news, but common sense said it couldn’t be right. Turning the gate on means executing at least one more line of code, so pure overhead should make the system slightly slower, not faster. That the on side got faster did not mean the gate’s cost was negative — it was a decisive signal that we had been measuring something other than “cost” all along.
The real reason it got faster was not that the gate was light
The cause lay in the “load” condition. We had run the test with the pipeline fully saturated, and under this extreme condition the gate blocked about 65% of all requests for being near expiry.1 When the gate discards a request up front, the downstream work that would have followed — the send operation and so on — vanishes wholesale. In other words, the on side was faster not because the gate was light, but because the gate relieved traffic up front and left the downstream system with less to do.
This is the crux. The load-shedding effect and the gate’s own overhead are entirely different metrics. Shedding reduces the workload and makes the whole system comfortable; overhead is the pure compute cost added every time a request is checked. Measure while shedding is happening, and the gate’s overhead gets buried under the huge performance gain that shedding brought.
Pure overhead can be measured only in a zero-drop state
The principle for correcting the measurement became clear. To measure the gate’s pure cost, the gate must not relieve a single request. So we decided to adjust the load and the time bound (T) generously to create a state where no request is discarded (zero drop), and then measure cost. In this condition the gate logic still runs for every request, but no actual blocking occurs, so the only thing left in the latency difference between the on and off sides is pure compute overhead.
We fixed the experimental condition, not the statistics
What we fixed for the re-measurement was not the statistical technique but the test condition. Interleaved A/B testing that alternates the on and off sides on the same instance to cancel out changes in machine state; discarding the warm-up noise from the first run; using the median over many runs; and setting a noise-floor reference — the natural variance that appears when the same binary is run repeatedly. All of these rigorous statistical methods had already been applied in the first measurement too.
In fact, it was precisely because we had these careful measurement instruments that we could tell the initial “18% faster” result was not simple measurement noise but a “real signal” that needed a root cause. The only thing we corrected was the “load condition.”
The noise floor we set here becomes an important decision baseline. If the difference between the on and off sides is smaller than this noise floor, it means the difference is too fine for the current measurement to capture.
The measured result, and how to avoid the next trap
In the re-run with the condition corrected, the difference between the on and off sides fell below the noise floor.2 So we do not flatly claim “the cost is zero.” What we can assert is only that “the gate’s overhead was so slight as to be indistinguishable from measurement noise” — and from an engineering standpoint, that is the accurate statement.
The lesson we drew here became a firm principle in every subsequent measurement. In the overhead measurements that followed, we made “zero drop” the first checkpoint without exception, and if even a single request was blocked we treated that measurement as invalid — to avoid the same trap from the start. Even in strictly controlled follow-up experiments, the compute cost of turning the gate on was always below the noise floor, and the effect of the reduced downstream workload from load shedding was accounted for separately as an efficacy, not a cost.
Closing
“Indistinguishable from zero” may sound weaker than “it is zero.” But technically it is a far more transparent statement. It means the resolution of our measurement environment was not fine enough to isolate that minuscule overhead — not that we proved, as if by magic, that the compute cost does not exist. Not forcing an interpretation onto a region you cannot measure, but clearly stating the limit: the trust in a performance claim comes exactly from this honesty.
We build a low-latency traffic filtering system that structurally controls tail latency for real-time bidding infrastructure.
If you want to test this gate on your real service traffic with no impact, you can start with a traffic-mirroring-based shadow-mode pilot.
Footnotes
The roughly 18% and roughly 65% are figures observed in a specific experimental environment where our pipeline was saturated to the extreme. Under that condition the gate blocked about 65% of all requests for being delayed (expired), and by relieving load up front it shortened total processing time by about 18%. Both figures are anecdotal measurements that arose in specific traffic and environment, so they cannot be used as general performance metrics. The claim of this post lies in the “measurement methodology,” not in the measured numbers. ↩ ↩2
The gate’s pure overhead can be derived accurately only under a condition where not a single request is discarded. The re-run adjusted the load and the bound so that drops caused by the gate logic in the pipeline were zero, then used an interleaved method alternating the on and off sides on the same instance. Methods such as interleaved A/B control, discarding the first run, using the median, and setting the noise floor were fixed variables applied identically in the first experiment as well; the only thing changed was the “load and bound condition.” The noise floor was defined as the natural variance that appears when the same binary is run repeatedly, and the observed time difference did not exceed the limit of that variance. (Absolute figures are omitted, as they are dependent on the test environment.) ↩