  A large fraction of online display advertising is sold via guaranteed
contracts: a publisher guarantees to the advertiser a certain number of user
visits satisfying the targeting predicates of the contract. The publisher is
then tasked with solving the ad serving problem - given a user visit, which of
the thousands of matching contracts should be displayed, so that by the
expiration time every contract has obtained the requisite number of user
visits. The challenges of the problem come from (1) the sheer size of the
problem being solved, with tens of thousands of contracts and billions of user
visits, (2) the unpredictability of user behavior, since these contracts are
sold months ahead of time, when only a forecast of user visits is available and
(3) the minute amount of resources available online, as an ad server must
respond with a matching contract in a fraction of a second.
  We present a solution to the guaranteed delivery ad serving problem using
{\em compact allocation plans}. These plans, computed offline, can be
efficiently queried by the ad server during an ad call; they are small, using
only O(1) space for contract; and are stateless, allowing for distributed
serving without any central coordination. We evaluate this approach on a real
set of user visits and guaranteed contracts and show that the compact
allocation plans are an effective way of solving the guaranteed delivery ad
serving problem.
