SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Destaque

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
 

Destaque (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...
 

Semelhante a 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
 

Semelhante a 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
 

Último

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 

Lessons learned from building Demand Side Platform