In the AD Tech field, most trading systems are compatible with the OpenRTB protocol. The tmax attribute in this protocol’s ad request (bid request) describes the total available time reserved by the requesting party for subsequent systems (measured in milliseconds). If this time is exceeded, it is considered a timeout, and no further response is awaited.

A typical RTB transaction chain involves the supply-side platform (SSP) system providing traffic, the ad exchange (ADX) system for centralized bidding, and the demand-side platform (DSP) system for traffic acquisition.

The request is initiated by the SSP system, forwarded by the ADX system to multiple DSP systems for bidding, and then the successful bids are returned to the SSP system.

SSP declares tmax and subsequent time division

In the request initiated by the SSP system, a numerical value of tmax is declared, such as 500, indicating that a response should be received within a maximum of 500 milliseconds. If it exceeds this time, no further waiting is done.

In the above transaction diagram, there are multiple network transmissions and processing by multiple systems, all of which consume time. For clarity, we will number the time consumption of each link and explain them separately.

  • Round-trip network transmission time between SSP and ADX: t11, t12
  • ADX processing time: request forwarding time t21, bid time t22
  • Round-trip network transmission time between ADX and DSP: t31, t32
  • DSP processing time t4

The sum of the above times is the total time T. If T is greater than the tmax set by SSP, it will timeout. Even if the bid is successful, SSP will not receive the response content.

For network transmission within the same region of cloud services, it can be conservatively estimated at 20ms round-trip and 10ms one-way; for different regions (such as Singapore, North America), it can be estimated at 200ms round-trip and 100ms one-way.

The estimation of processing time varies depending on the link protocol. If it is an HTTP link, the processing time of different systems is between a few milliseconds and 50ms, and can be averaged at 20ms; if it is an HTTPS link, the additional processing time of the encryption channel should be added, and in the case of long connections, it is generally estimated at 30ms.

Treatment of tmax by ADX systems

When ADX interprets the request from SSP, it has gone through the periods t11 and t21, and also needs to reserve time for t22 and t12. Therefore, when ADX forwards the request to DSP, it cannot directly use the tmax declared by the SSP system and should subtract the aforementioned 4 segments of time from it.

ADX.tmax = SSP.tmax – t11 – t21 – t22 – t12

Operators of ADX systems should understand the regions where SSP and DSP servers are located, and make corresponding settings within the ADX system. Combined with the deployment regions of the system itself, ADX.tmax can be estimated.

If ADX.tmax is less than the time to reach a certain DSP system (t31 + t4 + t32), there is no need to forward the request to that DSP. If ADX.tmax is negative, it indicates that the SSP system has set an excessively short reserved time, and the request can be discarded directly.

In addition, if the ADX system does not subtract SSP.tmax and directly forwards this tmax value, the upstream DSP system will receive an invalid tmax prompt, which is not conducive to optimizing the entire transaction chain.

Treatment of tmax by DSP systems

The treatment of tmax by DSP systems should be relatively straightforward. Based on the region of the ADX server, estimate the network round-trip time t31, t32, then estimate the link protocol and internal processing time t4, and compare it with the tmax received in the request (ADX.tmax) to determine if the remaining time is sufficient.

The above explanation pertains to the consideration of tmax in a relatively ideal trading environment. In actual operation, for ADX services and DSP services distributed globally, their domain names will automatically resolve to nodes near the requesting party. At this time, the system services are located in the nearest available area.