SlideShare a Scribd company logo
Virtual Meetup – January 2015
Agenda
• Developer Spotlight – Nicolas Emiliani – RTB Dev Lead
• RTBkit Behind the Scenes
• More than a Bidder – The RTBkit Stack
• Open Q&A
Copyright © 2015 Datacratic Inc. All rights reserved
Getting an RTBKit installation running.
More info here : http://datacratic.com/site/blog/tales-rtbkit-adventure
Nicolas Emiliani, RTB dev. team Tech Leader at Motrixi.
A little about our traffic :
 We are a mobile centered DSP
 We are connected to Nexage, Rubicon, Mopub and more recently to ADX
 We take up to 40k qps in peak hours from US and Canada
Life on the Amazon (not the rain forest)
 Create a VPC (or you will regret it, I promise)
 Create all your production nodes inside that VPC
 Be smart about security : do not expose your nodes
unnecessarily to the internet.
 Use a VPN software (ie: OpenVPN) to access the
nodes safely inside your VPC.
Isolating the RTBKit stack (BR loop)
 Chose an HTTP reverse proxy (we use NGINX)
 Set up the proxy as a gateway to your RTBKit installation, we use elastic
IP s on the NGINX nodes and allow incoming traffic only for the used
HTTP ports. Elastic IPS are cool and they will let you do all sort of handy
things.
 You can use the proxy as a load balancer if you have more than one
node
 You can use the proxy to automatically reply with 204s to the exchanges
in case you need to work on your installation
 You can use the proxy to clone the traffic and send it to a staging or
development environment (we recently cracked how to do this with
NGINX)
Isolating the RTBKit stack (BR loop)
Isolating the RTBKit PAL
 As with the BR loop use a reverse proxy with an Elastic IP
Type of nodes
 Different responsibilities → Different nodes → Easier scaling
Kernel parameters
 fs.file-max=300000 : RTBKit likes to chew up your file descriptors.
 net.ipv4.tcp_tw_reuse=1 : allow reusing sockets in TIME_WAIT state for
new connections.
 net.ipv4.tcp_fin_timeout=15 Close connections in the TCP FIN timeout
state in 15 seconds ( default 60 )
Tweaking this parameters will prevent crashes due to exceptions related to
too many open file descriptors.
Use the APIs, Luke
 Banker API : comes in handy when implementing pacing strategies thus
keeping logic simple in agents.
 Agent Configuration Service API : is useful to implement agent
configuration related APIs as the Agent Gateway
(https://github.com/nemiliani/agent_gateway).
Things that will help you out
 All our processes run under a watchdog, currently we are using monit
 Zabbix is your friend, particularly when things go wrong.
 Don't ever forget about Graphite. RTBKit is a huge black box otherwise.
Always keep an eye on your metrics. Yous should be doing it right now!,
no, really!
… QUESTIONS ?
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to the Stack
Transition To 14.04
What’s taking so long?
● Ancient Node.js version in platform-deps
o Upgrading requires fixing the bindings
o Lots of work, very little pay-off
Copyright © 2015 Datacratic Inc. All rights reserved
Alternative?
● Transition to HTTP interfaces
o Support for multiple languages
o Cleaner well defined OpenRTB protocol
o Start of RTBkit 2.0 implementation
Copyright © 2015 Datacratic Inc. All rights reserved
How will it work?
● Abstracted agent communication
o HTTP Bidder Interface class
o Agent config specifies bidder URL
Copyright © 2015 Datacratic Inc. All rights reserved
Details
● Added two new HTTP bidder examples:
o Python bidder based on tornado
o Node.js bidder
● Detailed walkthrough on the wiki
Copyright © 2015 Datacratic Inc. All rights reserved
Backwards compatibility?
● Node.js support will be dropped for 14.04
● ZMQ C++ interface will remain for now.
➔ Will require an upgrade.
➔ Should be fairly painless.
Copyright © 2015 Datacratic Inc. All rights reserved
Platform-deps
● Fork of platform-deps for RTBkit
o Upgrade dependencies to 14.04
o Cleanup of pointless dependencies
Copyright © 2015 Datacratic Inc. All rights reserved
How long?
● Platform-deps fork is almost completed
o Should be released in a week or two
o Work done by Michael
● Currently re-writing our agents in golang
o Will iron-out kinks in the bidder interface
o Should be done in a month or two
More Than a Bidder
A Brief Introduction to an RTB Stack
When you first think about RTB ...
You think, "I need a bidder." Copyright © 2015 Datacratic Inc. All rights reserved
But there is more to it than that ...
Campaign
Management
UI
Campaign
Reporting UI
ETL / Log
Processing
Offline
Optimization /
Bid Strategy
Logs / Log
Management
Ad Server
Online
Audience
Data Store
Offline Data
Prep
Monitoring Alerting 24/7 Ops
Conversion
Collection
Data
Collection /
DMP
Copyright © 2015 Datacratic Inc. All rights reserved
You need an RTB Solution
Requirement Provided by RTBkit?
Reliable, high-performance core bidder system Yes
Online Impression / Click / Conversion matching Yes
Pacing No
Logging Customer has to set up and manage logs
Monitoring and Alerting Some support for Carbon and Graphite
24-7 operations and support No
Capacity planning and system evolution No
Campaign management UI integrated with the bidder No
Seats on exchanges / integration with exchanges No
ETL for campaign reporting and bidding agents No
Other Issues …
Keep it Simple
● There is an abundance of inventory. Your goal is to process enough bids to
achieve your goals. Over-engineering is expensive.
● Unreliability is probably OK
o Campaigns run for a long time and buy millions of impressions. Short outages
probably don't matter
o Most partners fine with noticeable error rates (~2%)
Copyright © 2015 Datacratic Inc. All rights reserved
Other Issues …
Pacing and Strategy / Optimization
● Hard to do in real time, at high volume of transactions, in a distributed
system
● Hard to understand what data and how much data to use
● Risky
o blown daily caps
o uneven or poor performance
Copyright © 2015 Datacratic Inc. All rights reserved
Other Issues … Ad Ops
Existing Ad Ops
● Used to feature set of DSP UI
● Comfortable delivering campaigns with current tool set
● May be resistant to using a new system
● May be resistant to trusting a new system
● You may spend a lot of time on UI features and reports, not on your real-
time platform
Copyright © 2015 Datacratic Inc. All rights reserved
Host an RTBkit Meetup!
Copyright © 2015 Datacratic Inc. All rights reserved
Q & A
Copyright © 2015 Datacratic Inc. All rights reserved

More Related Content

PPTX
RTBkit 2.0 Roadmap Preview
PPTX
Developing Real Time Bidding Solutions with RTBkit Webinar On Demand
PPTX
RTBkit Introduction & Best Practices
PPT
Int'l Conference on Predictive APIs: RTB Optimizer presentation
PPTX
Why is programmatic taking off? What is this revolution all about?
PDF
A Technical Introduction to RTBkit
PDF
Lessons learned from building Demand Side Platform
PPTX
Using Kafka Streams to Analyze Live Trading Activity for Crypto Exchanges (Lu...
RTBkit 2.0 Roadmap Preview
Developing Real Time Bidding Solutions with RTBkit Webinar On Demand
RTBkit Introduction & Best Practices
Int'l Conference on Predictive APIs: RTB Optimizer presentation
Why is programmatic taking off? What is this revolution all about?
A Technical Introduction to RTBkit
Lessons learned from building Demand Side Platform
Using Kafka Streams to Analyze Live Trading Activity for Crypto Exchanges (Lu...

Similar to RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to the Stack (20)

PDF
WebSphere Liberty Real-Time Communications (WebRTC)
PPTX
DYI - Starting your own webrtc project
PDF
WebRTC: A front-end perspective
PDF
Programming Webrtc Build Realtime Streaming Applications For The Web 1st Edit...
PDF
Sprint 50 review
PDF
Programming WebRTC Build Real Time Streaming Applications for the Web 1st Edi...
PDF
Programming WebRTC Build Real Time Streaming Applications for the Web 1st Edi...
PDF
WebRTC: Mostly Video Bits
PPTX
Html web rtc
PPTX
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
PDF
WebRTC 101 - How to get started building your first WebRTC application
PDF
Sprint 51 review
PPTX
Why WebRTC DataChannel excites me
PDF
2015 Q4 webrtc standards update
PPTX
Multi-Layer DDoS Mitigation Strategies
PDF
Bounty bout 0x01 - WebRTC edition
PPTX
Deploying WebRTC successfully – A web developer perspective
PPTX
WebRTC Seminar Report
PDF
Scalable Django Architecture
PDF
Building real time applications with Symfony2
WebSphere Liberty Real-Time Communications (WebRTC)
DYI - Starting your own webrtc project
WebRTC: A front-end perspective
Programming Webrtc Build Realtime Streaming Applications For The Web 1st Edit...
Sprint 50 review
Programming WebRTC Build Real Time Streaming Applications for the Web 1st Edi...
Programming WebRTC Build Real Time Streaming Applications for the Web 1st Edi...
WebRTC: Mostly Video Bits
Html web rtc
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
WebRTC 101 - How to get started building your first WebRTC application
Sprint 51 review
Why WebRTC DataChannel excites me
2015 Q4 webrtc standards update
Multi-Layer DDoS Mitigation Strategies
Bounty bout 0x01 - WebRTC edition
Deploying WebRTC successfully – A web developer perspective
WebRTC Seminar Report
Scalable Django Architecture
Building real time applications with Symfony2
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
A Presentation on Artificial Intelligence
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
A Presentation on Artificial Intelligence
Network Security Unit 5.pdf for BCA BBA.
sap open course for s4hana steps from ECC to s4
Chapter 3 Spatial Domain Image Processing.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A comparative analysis of optical character recognition models for extracting...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Ad

RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to the Stack

  • 1. Virtual Meetup – January 2015
  • 2. Agenda • Developer Spotlight – Nicolas Emiliani – RTB Dev Lead • RTBkit Behind the Scenes • More than a Bidder – The RTBkit Stack • Open Q&A Copyright © 2015 Datacratic Inc. All rights reserved
  • 3. Getting an RTBKit installation running. More info here : http://datacratic.com/site/blog/tales-rtbkit-adventure Nicolas Emiliani, RTB dev. team Tech Leader at Motrixi.
  • 4. A little about our traffic :  We are a mobile centered DSP  We are connected to Nexage, Rubicon, Mopub and more recently to ADX  We take up to 40k qps in peak hours from US and Canada
  • 5. Life on the Amazon (not the rain forest)  Create a VPC (or you will regret it, I promise)  Create all your production nodes inside that VPC  Be smart about security : do not expose your nodes unnecessarily to the internet.  Use a VPN software (ie: OpenVPN) to access the nodes safely inside your VPC.
  • 6. Isolating the RTBKit stack (BR loop)  Chose an HTTP reverse proxy (we use NGINX)  Set up the proxy as a gateway to your RTBKit installation, we use elastic IP s on the NGINX nodes and allow incoming traffic only for the used HTTP ports. Elastic IPS are cool and they will let you do all sort of handy things.  You can use the proxy as a load balancer if you have more than one node  You can use the proxy to automatically reply with 204s to the exchanges in case you need to work on your installation  You can use the proxy to clone the traffic and send it to a staging or development environment (we recently cracked how to do this with NGINX)
  • 7. Isolating the RTBKit stack (BR loop)
  • 8. Isolating the RTBKit PAL  As with the BR loop use a reverse proxy with an Elastic IP
  • 9. Type of nodes  Different responsibilities → Different nodes → Easier scaling
  • 10. Kernel parameters  fs.file-max=300000 : RTBKit likes to chew up your file descriptors.  net.ipv4.tcp_tw_reuse=1 : allow reusing sockets in TIME_WAIT state for new connections.  net.ipv4.tcp_fin_timeout=15 Close connections in the TCP FIN timeout state in 15 seconds ( default 60 ) Tweaking this parameters will prevent crashes due to exceptions related to too many open file descriptors.
  • 11. Use the APIs, Luke  Banker API : comes in handy when implementing pacing strategies thus keeping logic simple in agents.  Agent Configuration Service API : is useful to implement agent configuration related APIs as the Agent Gateway (https://github.com/nemiliani/agent_gateway).
  • 12. Things that will help you out  All our processes run under a watchdog, currently we are using monit  Zabbix is your friend, particularly when things go wrong.  Don't ever forget about Graphite. RTBKit is a huge black box otherwise. Always keep an eye on your metrics. Yous should be doing it right now!, no, really!
  • 16. What’s taking so long? ● Ancient Node.js version in platform-deps o Upgrading requires fixing the bindings o Lots of work, very little pay-off Copyright © 2015 Datacratic Inc. All rights reserved
  • 17. Alternative? ● Transition to HTTP interfaces o Support for multiple languages o Cleaner well defined OpenRTB protocol o Start of RTBkit 2.0 implementation Copyright © 2015 Datacratic Inc. All rights reserved
  • 18. How will it work? ● Abstracted agent communication o HTTP Bidder Interface class o Agent config specifies bidder URL Copyright © 2015 Datacratic Inc. All rights reserved
  • 19. Details ● Added two new HTTP bidder examples: o Python bidder based on tornado o Node.js bidder ● Detailed walkthrough on the wiki Copyright © 2015 Datacratic Inc. All rights reserved
  • 20. Backwards compatibility? ● Node.js support will be dropped for 14.04 ● ZMQ C++ interface will remain for now. ➔ Will require an upgrade. ➔ Should be fairly painless. Copyright © 2015 Datacratic Inc. All rights reserved
  • 21. Platform-deps ● Fork of platform-deps for RTBkit o Upgrade dependencies to 14.04 o Cleanup of pointless dependencies Copyright © 2015 Datacratic Inc. All rights reserved
  • 22. How long? ● Platform-deps fork is almost completed o Should be released in a week or two o Work done by Michael ● Currently re-writing our agents in golang o Will iron-out kinks in the bidder interface o Should be done in a month or two
  • 23. More Than a Bidder A Brief Introduction to an RTB Stack
  • 24. When you first think about RTB ... You think, "I need a bidder." Copyright © 2015 Datacratic Inc. All rights reserved
  • 25. But there is more to it than that ... Campaign Management UI Campaign Reporting UI ETL / Log Processing Offline Optimization / Bid Strategy Logs / Log Management Ad Server Online Audience Data Store Offline Data Prep Monitoring Alerting 24/7 Ops Conversion Collection Data Collection / DMP Copyright © 2015 Datacratic Inc. All rights reserved
  • 26. You need an RTB Solution Requirement Provided by RTBkit? Reliable, high-performance core bidder system Yes Online Impression / Click / Conversion matching Yes Pacing No Logging Customer has to set up and manage logs Monitoring and Alerting Some support for Carbon and Graphite 24-7 operations and support No Capacity planning and system evolution No Campaign management UI integrated with the bidder No Seats on exchanges / integration with exchanges No ETL for campaign reporting and bidding agents No
  • 27. Other Issues … Keep it Simple ● There is an abundance of inventory. Your goal is to process enough bids to achieve your goals. Over-engineering is expensive. ● Unreliability is probably OK o Campaigns run for a long time and buy millions of impressions. Short outages probably don't matter o Most partners fine with noticeable error rates (~2%) Copyright © 2015 Datacratic Inc. All rights reserved
  • 28. Other Issues … Pacing and Strategy / Optimization ● Hard to do in real time, at high volume of transactions, in a distributed system ● Hard to understand what data and how much data to use ● Risky o blown daily caps o uneven or poor performance Copyright © 2015 Datacratic Inc. All rights reserved
  • 29. Other Issues … Ad Ops Existing Ad Ops ● Used to feature set of DSP UI ● Comfortable delivering campaigns with current tool set ● May be resistant to using a new system ● May be resistant to trusting a new system ● You may spend a lot of time on UI features and reports, not on your real- time platform Copyright © 2015 Datacratic Inc. All rights reserved
  • 30. Host an RTBkit Meetup! Copyright © 2015 Datacratic Inc. All rights reserved
  • 31. Q & A Copyright © 2015 Datacratic Inc. All rights reserved