SlideShare a Scribd company logo
1 of 31
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 ?
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

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

Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
GetInData
 
NATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATSNATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATS
Raül Pérez
 

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

MQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT ExtensionMQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT Extension
 
Charles sonigo - Demuxed 2018 - How to be data-driven when you aren't Netflix...
Charles sonigo - Demuxed 2018 - How to be data-driven when you aren't Netflix...Charles sonigo - Demuxed 2018 - How to be data-driven when you aren't Netflix...
Charles sonigo - Demuxed 2018 - How to be data-driven when you aren't Netflix...
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDMulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
OpenTelemetry For Architects
OpenTelemetry For ArchitectsOpenTelemetry For Architects
OpenTelemetry For Architects
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
VozDigital DevFest 31/10/14
VozDigital DevFest 31/10/14VozDigital DevFest 31/10/14
VozDigital DevFest 31/10/14
 
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
 
Volta: Logging, Metrics, and Monitoring as a Service
Volta: Logging, Metrics, and Monitoring as a ServiceVolta: Logging, Metrics, and Monitoring as a Service
Volta: Logging, Metrics, and Monitoring as a Service
 
Websocket 101 in Python
Websocket 101 in PythonWebsocket 101 in Python
Websocket 101 in Python
 
Modern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and ReactorModern messaging with RabbitMQ, Spring Cloud and Reactor
Modern messaging with RabbitMQ, Spring Cloud and Reactor
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
NATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATSNATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATS
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
 

Recently uploaded

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
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

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!
  • 14.
  • 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