Pacing - datacratic/rtbkit GitHub Wiki

RTBkit does not include an explicit pacing mechanism feature, however its API's make it relatively easy to implement various pacing schemes via user plugins.

One way to implement a linear pacing scheme would be to set up a 2-level budget-account hierarchy in the Banker. Say budget account X has a child budget account X:Y.

  • X
  • X:Y

A campaign is meant to last for 30 days, spending $10,000, so that is the budget amount set in account X. The desired linear spend-rate is therefore around $0.0579 every 15 seconds. If an agent is set to bid under account X:Y, and the Banker API is used to set that account's balance to $0.0579 every 15 seconds, the net effect is that the agent will spend at no more than the desired spend rate. If it spending faster, the Banker will cut off bidding once that 15-second timestep's budget has been spent, and the agent's bids will be rejected until the following 'topup'. This will cause the second-by-second spend rate to look rather like a square wave, but the macro-level effect will be that the spend rate is the desired one. Note that if the agent is spending slower than the desired rate, then this system will not be able to help it ramp up its spend.

One improvement to the above scheme would be to have the agent monitor its spend rate (i.e. by calling the Banker to measure the delta-spend over time) and use the bidProbability configuration option to periodically request that the RTBkit core drop some percentage of bid requests, so as to ensure that the budget allocated for a given 15-second timestep lasts until the end of that timestep.

Another improvement to the above scheme, to avoid underspending, would be to have the agent monitor its spend rate and if it is too low, bid higher or more often.