SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
Distributed Quota Management
in an Ad Serving Environment
How Reduce Data Manages its budgets without exceeding ad spends

http://reducedata.com
Problem
Managing Quotas / Budgets in An Ad Serving
Environment is not a trivial task.
Ad Campaign Budgets Across a
Distributed infrastructure when not managed
properly leads to excess spends.
Previous Solution
Sync Every 5 seconds
Cassandra Data

Ad Server
Ad Server
Ad Server

Kafka Pipe

Data processing
system

Hbase based
campaign
reporting data
The Issues
Simple Syncing of data across distributed data structure is easy but sticking
within limits is tough.
5 second refresh not guaranteed to be upto date. Reporting delays caused
spends to exceed.
Server specific budget was not proportionately allocated, based on historical
availability of traffic on that server.
No clear mechanism of allocation of budget spends or reallocation (when
servers go down).
Solution
●

●

●

Our Solution was based on this white paper
titled:
Quota enforcement for high-performance
distributed storage systems
http://www.ssrc.ucsc.edu/Papers/pollackmsst07.pdf
Key Concepts
●
●

●

●

Epoc : A day is divided into epocs.
At each epoc DSPServers request for quota from Quota
Management Cluster.
Ad Server doesn't decide how much quota it needs instead
a new entity the Quota Management Cluster decides how
much quota to assign to it.
Traffic for a Campaign maybe available at multiple
endpoints(US East, US West, Asia)
How Quotas are Decided
●

●

Quota is distributed to end points (different data centre locations) and to
the individual servers depending on the historical traffic / consumption
of budgets.
Two factors that decide how much is allocated in each epoc:
●

●

Pacing variable as decided by the advertiser
Historical consumption data (for example has the campaign been
spending lesser than planned?, if so, increase EPOC allocation)
Quota Management Cluster
●

●

Quota management cluster has multiple servers and needs
a data store which supports transactions.
The Quota Management Cluster is Synchronized using
Zookeper.
Logical Architecture
Sync at every EPOC 2 ways
Ad Server
Ad Server
Ad Server

Ad servers can sync with the Quota management server at EPOC which could
be say every hour.
Ad servers refund unspent balance to Quota Management Cluster.
Quota management can be in one location initially but can be made redundant
to each data centre.
Quota Management Cluster uses a shared data store on cassandra to sync its
other nodes for allocation.

Quota
Quota
Management
Management
Server
Server

Cassandra based
Cassandra
Quota data based
Quota data

Zookeeper
Zookeeper
Sync Process
Ad Server

Quota Management Server

Zookeeper

Cassandra

Sync at every EPOC
Push budgets, get unspent amounts
Sync allocation data to cassandra cluster
Check Server status
Get list of available ad servers
Push available budgets on a restart.

Calculate available spends
Handling Ad Server Shut Downs
●

●

Zookeeper tracks server failures.
Quota management system reallocates remaining budget
(last budget allocated - amount spent) to a new or the same
server when it restarts.
Handling Communications
The Quota Management Servers talk to Ad Servers using
REST Calls. This required lowest development time and was
built on top of the existing stack.
Alternatives we considered but decided against.
2. Kafka
3. RPC over protobuf
Get in Touch
Engineering Team
Reduce Data
reducedata.com
twitter: @reducedata
facebook.com/reducedata
engineering@reducedata.com

Más contenido relacionado

Destacado

“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...
“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...
“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...The Hive
 
Advertisement ad agencies cb_ ind mktg_
Advertisement  ad agencies  cb_ ind mktg_Advertisement  ad agencies  cb_ ind mktg_
Advertisement ad agencies cb_ ind mktg_Ritesh Anand
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 
Creative process in advertising
Creative process in advertisingCreative process in advertising
Creative process in advertisingAnup Thapa
 
The Structure of Advertising Agencies
The Structure of Advertising AgenciesThe Structure of Advertising Agencies
The Structure of Advertising AgenciesHeleen Mills
 
Advertising Agency
Advertising AgencyAdvertising Agency
Advertising AgencyMohsin Akbar
 
Advertising agency and its functions
Advertising agency and its functionsAdvertising agency and its functions
Advertising agency and its functionsHarshita Tandon
 
Ad agency and its functions
Ad agency and its functionsAd agency and its functions
Ad agency and its functionsvirdhi joshi
 
An Introduction to Online Advertising
An Introduction to Online AdvertisingAn Introduction to Online Advertising
An Introduction to Online Advertisingsuhasmallya
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about serversSasin Prabu
 
Project Management in Advertising
Project Management in AdvertisingProject Management in Advertising
Project Management in AdvertisingKaye I. Smith, PMP
 
Understanding the Online Advertising Technology Landscape
Understanding the Online Advertising Technology Landscape Understanding the Online Advertising Technology Landscape
Understanding the Online Advertising Technology Landscape Karina Sanz
 
Human Resource planning
Human Resource planningHuman Resource planning
Human Resource planningAnything Group
 

Destacado (15)

“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...
“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...
“ High Precision Analytics for Healthcare: Promises and Challenges” by Sriram...
 
Advertisement ad agencies cb_ ind mktg_
Advertisement  ad agencies  cb_ ind mktg_Advertisement  ad agencies  cb_ ind mktg_
Advertisement ad agencies cb_ ind mktg_
 
Advertising Design
Advertising DesignAdvertising Design
Advertising Design
 
Basic TV Ad Production
Basic TV Ad ProductionBasic TV Ad Production
Basic TV Ad Production
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
Creative process in advertising
Creative process in advertisingCreative process in advertising
Creative process in advertising
 
The Structure of Advertising Agencies
The Structure of Advertising AgenciesThe Structure of Advertising Agencies
The Structure of Advertising Agencies
 
Advertising Agency
Advertising AgencyAdvertising Agency
Advertising Agency
 
Advertising agency and its functions
Advertising agency and its functionsAdvertising agency and its functions
Advertising agency and its functions
 
Ad agency and its functions
Ad agency and its functionsAd agency and its functions
Ad agency and its functions
 
An Introduction to Online Advertising
An Introduction to Online AdvertisingAn Introduction to Online Advertising
An Introduction to Online Advertising
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
 
Project Management in Advertising
Project Management in AdvertisingProject Management in Advertising
Project Management in Advertising
 
Understanding the Online Advertising Technology Landscape
Understanding the Online Advertising Technology Landscape Understanding the Online Advertising Technology Landscape
Understanding the Online Advertising Technology Landscape
 
Human Resource planning
Human Resource planningHuman Resource planning
Human Resource planning
 

Último

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 

Último (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Distributed Quota Management in an Ad Ad Serving Environment OR How we manage ad spends across data centres without over spending

  • 1. Distributed Quota Management in an Ad Serving Environment How Reduce Data Manages its budgets without exceeding ad spends http://reducedata.com
  • 2. Problem Managing Quotas / Budgets in An Ad Serving Environment is not a trivial task. Ad Campaign Budgets Across a Distributed infrastructure when not managed properly leads to excess spends.
  • 3. Previous Solution Sync Every 5 seconds Cassandra Data Ad Server Ad Server Ad Server Kafka Pipe Data processing system Hbase based campaign reporting data
  • 4. The Issues Simple Syncing of data across distributed data structure is easy but sticking within limits is tough. 5 second refresh not guaranteed to be upto date. Reporting delays caused spends to exceed. Server specific budget was not proportionately allocated, based on historical availability of traffic on that server. No clear mechanism of allocation of budget spends or reallocation (when servers go down).
  • 5. Solution ● ● ● Our Solution was based on this white paper titled: Quota enforcement for high-performance distributed storage systems http://www.ssrc.ucsc.edu/Papers/pollackmsst07.pdf
  • 6. Key Concepts ● ● ● ● Epoc : A day is divided into epocs. At each epoc DSPServers request for quota from Quota Management Cluster. Ad Server doesn't decide how much quota it needs instead a new entity the Quota Management Cluster decides how much quota to assign to it. Traffic for a Campaign maybe available at multiple endpoints(US East, US West, Asia)
  • 7. How Quotas are Decided ● ● Quota is distributed to end points (different data centre locations) and to the individual servers depending on the historical traffic / consumption of budgets. Two factors that decide how much is allocated in each epoc: ● ● Pacing variable as decided by the advertiser Historical consumption data (for example has the campaign been spending lesser than planned?, if so, increase EPOC allocation)
  • 8. Quota Management Cluster ● ● Quota management cluster has multiple servers and needs a data store which supports transactions. The Quota Management Cluster is Synchronized using Zookeper.
  • 9. Logical Architecture Sync at every EPOC 2 ways Ad Server Ad Server Ad Server Ad servers can sync with the Quota management server at EPOC which could be say every hour. Ad servers refund unspent balance to Quota Management Cluster. Quota management can be in one location initially but can be made redundant to each data centre. Quota Management Cluster uses a shared data store on cassandra to sync its other nodes for allocation. Quota Quota Management Management Server Server Cassandra based Cassandra Quota data based Quota data Zookeeper Zookeeper
  • 10. Sync Process Ad Server Quota Management Server Zookeeper Cassandra Sync at every EPOC Push budgets, get unspent amounts Sync allocation data to cassandra cluster Check Server status Get list of available ad servers Push available budgets on a restart. Calculate available spends
  • 11. Handling Ad Server Shut Downs ● ● Zookeeper tracks server failures. Quota management system reallocates remaining budget (last budget allocated - amount spent) to a new or the same server when it restarts.
  • 12. Handling Communications The Quota Management Servers talk to Ad Servers using REST Calls. This required lowest development time and was built on top of the existing stack. Alternatives we considered but decided against. 2. Kafka 3. RPC over protobuf
  • 13. Get in Touch Engineering Team Reduce Data reducedata.com twitter: @reducedata facebook.com/reducedata engineering@reducedata.com