-
Notifications
You must be signed in to change notification settings - Fork 406
Post Auction Loop State Machine
The PAL has several timeouts for various state of the auction so here's a quick rundown of the logic:
- When receiving a
bid
, it receives a 15sec timeout. - When receiving a
win
with no matchingbid
, it receives a 15min timeout. - When receiving a
win
with a matchingbid
, the 15sec timeout is reset to 1hour. We also generate aMATCHEDWIN
event and adjust the banker using the account in the bid. - When receiving a
win
with a matchingloss
, we re-commit the money in the banker, generate aLATEWIN
event and reset the timeout to 1 hour. - When receiving a
campaign event
with no matchingbid
,win
orloss
, it's dropped. - When receiving a
campaign event
with a matchingbid
, aMATCHEDCAMPAIGNEVENT
is generated. - If a
bid
timeout with no matchingwin
, aloss
is assumed, aMATCHEDLOSS
event is generated, the money is recycled in the banker and the timeout is reset to 15min. - If a
win
timeout with no matchingbid
, we assume it is late and use the account in the passback if present to adjust the banker before dropping the event. This is aREALLY REALLY REALLY LATE WIN
. - If a
loss
timeout with no matching bid, it is dropped.
So in a nutshell, there's 3 timeout window, 15sec, 15min and 1 hour.
-
The 15 second window is used to infer losses if a bid is submitted with no matching wins. (Configurable in the router_runner with --loss-seconds flag)
-
The 15 minute window is used to detect late wins while still allowing the budget to be spent. (Configurable in the post_auction_runner with --auction-seconds flag)
-
The 1 hour window is used to match bids to long term events like clicks. Note that this is not guaranteed to catch all long term events and you should therefor also have an ETL process that runs out-of-band to ensure that no events are missed. That being said, it's still useful to get quick feedback for your agents so that they're better able to adapt in real-time. (Configurable in the post_auction_runner with --win-seconds flag)
- Getting Started
- Pull Request Guidelines
- Coding Standards
- Demo Stack
- How to compile static filters test
- RTBkit Binary Package
- Architecture
- Bid Request Lifecycle
- ZooKeeper Nodes
- Load Shedding
- Banker
- Post Auction Loop State Machine
- Post-Auction Loop Sharding
- ZMQ Endpoints