SlideShare une entreprise Scribd logo
1  sur  49
LESSONS LEARNED FROM
BUILDING DSP 	

IN BIDLAB
Bartosz Bogacki <bbogacki@bidlab.pl>
CTO, CODER, ROCK CLIMBER
• current: 	

• Chief Technology Officer at Bidlab
• previous:	

• IT Director at
InternetowyKantor.pl SA
• Software Architect / Project
Manager at Wolters Kluwer
Polska
• find out more (if you care):	

• linkedin.com/in/bartoszbogacki
BIDLAB IS A DSP
DSP stands for Demand Side Platform
WHATTOOLS DO WE USE?
HOW ?
• Learn how generic solutions work
for the biggest in the industry:	

• highscalability.com	

• blog.twitter.com	

• techblog.netflix.com	

• codeascraft.com	

• etc.
HOW ?
• github.com/facebook	

• github.com/twitter	

• github.com/Netflix	

• github.com/google	

• github.com/etsy	

• github.com/Instagram
DON’T BELIEVE EVERYTHING
YOU CAN READ!
BE AWARETHAT
• There’s a lot of crappy blog posts	

• There’s a lot of ugly shortcuts on Stack Overflow	

• There’s a lot of poor quality comparison tests (comparing
apples and oranges, incorrectly measuring or not isolating
measured feature properly)	

• Others have often different environment / data / usage
scenarios than you!
DESIGNYOUR CORE
ARCHITECTURE
USETECHNOLOGY STACK
THATYOU 	

KNOW WELL
CHOOSE GOOD 	

TOOLS AND LIBRARIES
• Learn how it works …really!	

• Learn what are the constraints and weak points	

• Check if it is supported by active community	

• Use open source or pay for support (startup
programs are for kamikaze)
USE CLOUD HOSTING BUT…
• Don’t get locked-in !!	

• Always test machine performance (often)	

• Monitor CPU steal time	

• Decide what you need (IO / memory / cpu / storage)	

• Be aware of roundtrip time
YOU WON’T BE ABLETO DO
ALL PROCESSING ON-LINE
…SO RESPOND NOW, 	

AND PROCESS LATER
DECIDE WHATYOU CAN DO
ASYNCHRONOUSLY
DECIDE WHATYOU CAN DO
AS A BATCH JOB
USE ASYNC WISELY
• Programming language mechanisms (threads,
futures, reactive pattern, etc.)	

• Simple Queuing Systems (Amazon SQS, Redis pub
sub, etc.)	

• Advanced Message Queueing Protocol - AMQP
(zeromq, rabbitmq, hornetq, etc.)
BATCH! (IFYOU CAN)
• Process off-line as much as
you can	

• crontab jobs	

• job execution
frameworks (like quartz)
CACHE AS MUCH ASYOU
CAN !
CACHE GUIDELINES
• If you deliver static content - do it from cache (like varnish)	

• Use in memory database (like memcached or redis) to
cache data or subresults for your application 	

• Use lightweight inapp cache to lower communication cost
(like Guava Loading Cache)	

• Have a strategy for feeding and invalidating of your cache at
each level
THINK ABOUT HA
• Have a HA plan, but do not implement, until you
really need it. Until then - do (and test) backups! :)	

• Most of technologies that you would use have
recommended fault-tolerance solution, do not
invent it by yourself !
GATHER PRODUCTION DATA	

ANDTHEN	

TEST YOUR CONCEPTS &TOOLS
DON’T ASSUME !
• Use real, production data if you can! 	

• The real life is often more complex than you
thought at the beginning (typos, data consistency,
exceptions)
DO FUNCTIONAL &
PERFORMANCE TESTING
• Use great tools, don’t invent
the wheel	

• xUnit	

• soapui	

• apache-benchmark (ab)	

• jmeter
PROFILE EARLY & OFTEN
• Know your application from
the execution perspective	

• Know your hotspots	

• VisualVM !!
PROFILE ”ENVIRONMENT”
OPTIMIZEYOUR DATA ACCESS
redis-faina
TUNE OPERATING SYSTEM
• Set sysctls for high load systems	

• Set system limits for high load systems	

• Don’t swap
TUNEYOUR GC 	

(IFYOU HAVE ONE ;)
• …or at least monitor it, to
know how it hits your
performance	

• Monitor & tune GC of used
subsystems (Cassandra,
Tomcat, Hadoop,Apache-
Spark, etc.)
MONITOR AS MUCH 	

ASYOU CAN
BUILD MONITORING 	

INYOUR SOFTWARE
GREATTOOLSTO USE FOR
MONITORING
• Graphite (graphite.wikidot.com)	

• New Relic (newrelic.com)
MONITOR ERRORS
sentry (github.com/getsentry/sentry)
MONITOR CPU USAGE, LOAD
AND STEAL
top, htop, atop, etc.
CROSS-MONITOR SYSTEM
PARAMETERS
dstat
LEARN, EVALUATE & SCALE
PUT AN EFFORTTO BUILD
AUTOMATED ENVIRONMENT
• To build your software (maven, gradle, etc.)	

• To test your software (junit, soapui, jmeter, etc.)	

• To deploy your software (jenkins)
UNDERSTANDYOUR DATA
Google refine (code.google.com/p/google-refine/)
KEEPTHINGS SIMPLE
LOG A LOT :)
WHENYOU DEPLOY OR
MIGRATE… HAVE A PLAN!
…AND ALWAYS KNOW 	

HOW TO ROLL BACK
NEWTECHNOLOGY IS
FRAGILE !!
THE BUG IS IN YOUR CODE
YOU WILL FAIL MANYTIMES…
…BUT DON’T GIVE UP !
THANKS!
we’re hiring !	

mail me: bbogacki@bidlab.pl

Contenu connexe

En vedette

Introduction to Apache Spark / PUT 06.2014
Introduction to Apache Spark / PUT 06.2014Introduction to Apache Spark / PUT 06.2014
Introduction to Apache Spark / PUT 06.2014
bbogacki
 
StrikeAd & Experian briefing November 2013: The London Edition Hotel
StrikeAd & Experian briefing November 2013: The London Edition HotelStrikeAd & Experian briefing November 2013: The London Edition Hotel
StrikeAd & Experian briefing November 2013: The London Edition Hotel
morsya
 
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
Shuai Yuan
 

En vedette (14)

Large-Scale Distributed Systems in Display Advertising
Large-Scale Distributed Systems in Display AdvertisingLarge-Scale Distributed Systems in Display Advertising
Large-Scale Distributed Systems in Display Advertising
 
Introduction to Apache Spark / PUT 06.2014
Introduction to Apache Spark / PUT 06.2014Introduction to Apache Spark / PUT 06.2014
Introduction to Apache Spark / PUT 06.2014
 
StrikeAd & Experian briefing November 2013: The London Edition Hotel
StrikeAd & Experian briefing November 2013: The London Edition HotelStrikeAd & Experian briefing November 2013: The London Edition Hotel
StrikeAd & Experian briefing November 2013: The London Edition Hotel
 
Cubes – pluggable model explained
Cubes – pluggable model explainedCubes – pluggable model explained
Cubes – pluggable model explained
 
MaxAxion & StrikeAd Geo-fencing and Geo-Audiences
MaxAxion & StrikeAd Geo-fencing and Geo-AudiencesMaxAxion & StrikeAd Geo-fencing and Geo-Audiences
MaxAxion & StrikeAd Geo-fencing and Geo-Audiences
 
Bubbles – Virtual Data Objects
Bubbles – Virtual Data ObjectsBubbles – Virtual Data Objects
Bubbles – Virtual Data Objects
 
RTBMA ECIR 2016 tutorial
RTBMA ECIR 2016 tutorialRTBMA ECIR 2016 tutorial
RTBMA ECIR 2016 tutorial
 
Designing the perfect display monetization dashboard (public)
Designing the perfect display monetization dashboard (public)Designing the perfect display monetization dashboard (public)
Designing the perfect display monetization dashboard (public)
 
2015Media kit-E
2015Media kit-E2015Media kit-E
2015Media kit-E
 
Artem Makarov, Business Development Russia, Trademob
Artem Makarov, Business Development Russia, TrademobArtem Makarov, Business Development Russia, Trademob
Artem Makarov, Business Development Russia, Trademob
 
Matomy Mobile
Matomy MobileMatomy Mobile
Matomy Mobile
 
DSPs, RTB and Programmatic Buying: What Is It and Why Should I Care?
 DSPs, RTB and Programmatic Buying: What Is It and Why Should I Care? DSPs, RTB and Programmatic Buying: What Is It and Why Should I Care?
DSPs, RTB and Programmatic Buying: What Is It and Why Should I Care?
 
Dynamo DB & RDS Deep Dive - AWS India Summit 2012
Dynamo DB & RDS Deep Dive - AWS India Summit 2012Dynamo DB & RDS Deep Dive - AWS India Summit 2012
Dynamo DB & RDS Deep Dive - AWS India Summit 2012
 
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
CIKM 2013 Tutorial: Real-time Bidding: A New Frontier of Computational Advert...
 

Similaire à Lessons learned from building Demand Side Platform

Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
Tomas Doran
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Data Works MD
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
Abdelmonaim Remani
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
 

Similaire à Lessons learned from building Demand Side Platform (20)

From a student to an apache committer practice of apache io tdb
From a student to an apache committer  practice of apache io tdbFrom a student to an apache committer  practice of apache io tdb
From a student to an apache committer practice of apache io tdb
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
Stackato v4
Stackato v4Stackato v4
Stackato v4
 
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
 
Stackato v3
Stackato v3Stackato v3
Stackato v3
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 
Stackato v2
Stackato v2Stackato v2
Stackato v2
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
 
The Lost Tales of Platform Design (February 2017)
The Lost Tales of Platform Design (February 2017)The Lost Tales of Platform Design (February 2017)
The Lost Tales of Platform Design (February 2017)
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
Stream Computing (The Engineer's Perspective)
Stream Computing (The Engineer's Perspective)Stream Computing (The Engineer's Perspective)
Stream Computing (The Engineer's Perspective)
 
Dev Ops without the Ops
Dev Ops without the OpsDev Ops without the Ops
Dev Ops without the Ops
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 

Dernier

Dernier (20)

The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 

Lessons learned from building Demand Side Platform