SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
30 billion requests per day with a NoSQL architecture

USI 2013, Paris
Julien SIMON
Vice President, Engineering
j.simon@criteo.com @julsimon
GO
 GO
GO
Powered by 
PERFORMANCE DISPLAY
Copyright © 2013 Criteo. Confidential
A user sees products 
on your …
… and sees

After on the banner, 
the user goes back to the product page.
...then browses 
the
2
CRITEO "

3
•  R&D EFFORT
•  RETARGETING
•  CPC
PHASE 1 : 2005-2008
CRITEO CREATION 
•  MORE THAN 3000 CLIENTS
•  35 COUNTRIES, 15 OFFICES
•  R&D: MORE THAN 300 PEOPLE
PHASE 2 : 2008-2012
GLOBAL LEADER : + 700 EMPLOYEES!
2007
15
EMPLOYEES

2009
84
EMPLOYEES

6
EMPLOYEES

2005
2010
203
EMPLOYEES

2012
+700
EMPLOYEES SO FAR

2006
2011
395
EMPLOYEES

2008
33
EMPLOYEES
INFRASTRUCTURE
4
Copyright © 2013 Criteo. Confidential.
 DAILY TRAFFIC
- HTTP REQUESTS: 30+ BILLION
- BANNERS SERVED: 1+ BILLION
 PEAK TRAFFIC (PER SECOND)
- HTTP REQUESTS: 500,000+
- BANNERS: 25,000+
 7 DATA CENTERS
 SET UP AND MANAGED
IN-HOUSE
 AVAILABILITY > 99.95%
5
Copyright © 2013 Criteo. Confidential.
HIGH PERFORMANCE COMPUTING
FETCH, STORE, CRUNCH, QUERY 20 additional TB EVERY DAY ?

…SUBTITLED « HOW I LEARNED TO STOP WORRYING AND LOVE HPC »
CASE STUDY #1: PRODUCT CATALOGUES
•  Catalogue = product feed provided by advertisers (product id, description,
category, price, URL, etc)
•  3000+ catalogues, ranging from a few MB to several tens of GB
•  About 50% of products change every day
•  Imported at least once a day by an in-house application
•  Data replicated within a geographical zone
•  Accessed through a cache layer by web servers
•  Microsoft SQL Server used from day 1
•  Running fine in Europe, but…
–  Number of databases (1 per advertiser)… and servers
–  Size of databases
–  SQL Server issues hard to debug and understand
•  Running kind of fine in the US, until dead end in Q1 2011
–  transactional replication over high latency links
Copyright © 2010 Criteo. Confidential.
FROM SQL SERVER TO MONGODB
•  Ah, database migrations… everyone loves them !
•  1st step: solve replication issue
–  Import and replicate catalogues in MongoDB
–  Push content to SQL Server, still queried by web servers
•  2nd step: prove that MongoDB can survive our web traffic
–  Modify web applications to query MongoDB
–  C-a-r-e-f-u-l-l-y switch web queries to MongoDB for a small set of catalogues
–  Observe, measure, A/B test… and generally make sure that the system still works
•  3rd step: scale !
–  Migrate thousands of catalogues away from SQL Server
–  Monitor and tweak the MongoDB clusters
–  Add more MongoDB servers… and more shards
–  Update ops processes (monitoring, backups, etc)
•  About 150 MongoDB servers live today (EU/US/APAC)
–  Europe: 800M products, 1TB of data, 1 billion requests / day
–  Started with 2.0 (+ Criteo patches) " 2.2 " 2.4.3
Copyright © 2010 Criteo. Confidential.
MONGODB, 2.5 YEARS LATER
•  Stable (2.4.3 much better)
•  Easy to (re)install and administer
•  Great for small datasets (i.e. smaller than server RAM)
•  Good performance if read/write ratio is high
•  Failover and inter-DC replication work (but shard early!)
•  Performance suffers when :
–  dataset much larger than RAM
–  read/write ratio is low
–  Multiple applications coexist on the same cluster
•  Some scalability issues remain (master-slave, connections)
•  Criteo is very interested in the 10gen roadmap !
Copyright © 2010 Criteo. Confidential.
CASE STUDY #2: HADOOP
9
Copyright © 2013 Criteo. Confidential.
1st cluster live in June 2011
(2 Petabytes)
« Express » launch required
by brutal growth of traffic
Traditional processing
(in-house tools + SQL Server)
completely replaced by Hadoop
Dual-use: production
(prediction, recommandation, etc.)
and Business Intelligence
(reporting, traffic analysis)
Visible ROI :
Increase of CTR and CR
2nd cluster live in April 2013
(6 Petabytes"?)
HADOOP IS AWESOME… BUT CAVEAT EMPTOR!
•  Batch processing architecture, not real-time " hence our work on Storm
•  Beware how data is organized and presented to jobs (LZO, RCFile, etc) "
hence our work on Parquet with Twitter & Cloudera
•  namenode = SPOF " backup + HA in CDH4
•  Understand HDFS replication (under-replicated blocks)
•  Have a stack of extra hard drives ready
•  Lack of ops / prod tools: data import/export, monitoring, metrology, etc
•  Lots of work needed for an efficient multi-user setup:
scheduling, quotas, etc.
•  At scale, infrastructure skills are mandatory
–  Server selection, CPU/storage ration
–  Linux & Java tuning
–  LAN architecture: watch your switches!
Copyright © 2010 Criteo. Confidential.
THANKS A LOT FOR YOUR ATTENTION!
11
Copyright © 2013 Criteo. Confidential.
www.criteo.com
engineering.criteo.com
30 billion requests per day with a NoSQL architecture (2013)

Mais conteúdo relacionado

Semelhante a 30 billion requests per day with a NoSQL architecture (2013)

ppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
ppt vdo stream cloud comp.ppt Cloud computing with the help of AWSppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
ppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
vij7027
 

Semelhante a 30 billion requests per day with a NoSQL architecture (2013) (20)

Titanium Conf Baltimore Keynote 2013
Titanium Conf Baltimore Keynote 2013Titanium Conf Baltimore Keynote 2013
Titanium Conf Baltimore Keynote 2013
 
Js foo - Sept 8 upload
Js foo - Sept 8 uploadJs foo - Sept 8 upload
Js foo - Sept 8 upload
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Denver Cloud Foundry Meetup - February 2016
Denver Cloud Foundry Meetup - February 2016Denver Cloud Foundry Meetup - February 2016
Denver Cloud Foundry Meetup - February 2016
 
ppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
ppt vdo stream cloud comp.ppt Cloud computing with the help of AWSppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
ppt vdo stream cloud comp.ppt Cloud computing with the help of AWS
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
L2-3.FA19.ppt
L2-3.FA19.pptL2-3.FA19.ppt
L2-3.FA19.ppt
 
Introduction To Cloud Computing.ppt
Introduction To Cloud Computing.pptIntroduction To Cloud Computing.ppt
Introduction To Cloud Computing.ppt
 
cloud computing services
cloud computing servicescloud computing services
cloud computing services
 
Internet of behaviours features and documents
Internet of behaviours features and documentsInternet of behaviours features and documents
Internet of behaviours features and documents
 
L2 3.fa19
L2 3.fa19L2 3.fa19
L2 3.fa19
 
Dubbo and Weidian's practice on micro-service architecture
Dubbo and Weidian's practice on micro-service architectureDubbo and Weidian's practice on micro-service architecture
Dubbo and Weidian's practice on micro-service architecture
 
Drupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimatesDrupal fixed budget projets : the art of estimates
Drupal fixed budget projets : the art of estimates
 

Mais de Julien SIMON

Mais de Julien SIMON (20)

An introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging FaceAn introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging Face
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
 
Building NLP applications with Transformers
Building NLP applications with TransformersBuilding NLP applications with Transformers
Building NLP applications with Transformers
 
Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)
 
Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)
 
Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)
 
An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)
 
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
 
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)
 
The Future of AI (September 2019)
The Future of AI (September 2019)The Future of AI (September 2019)
The Future of AI (September 2019)
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"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 ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
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, ...
 

30 billion requests per day with a NoSQL architecture (2013)

  • 1. 30 billion requests per day with a NoSQL architecture USI 2013, Paris Julien SIMON Vice President, Engineering j.simon@criteo.com @julsimon
  • 2. GO GO GO Powered by PERFORMANCE DISPLAY Copyright © 2013 Criteo. Confidential A user sees products on your … … and sees After on the banner, the user goes back to the product page. ...then browses the 2
  • 3. CRITEO " 3 •  R&D EFFORT •  RETARGETING •  CPC PHASE 1 : 2005-2008 CRITEO CREATION •  MORE THAN 3000 CLIENTS •  35 COUNTRIES, 15 OFFICES •  R&D: MORE THAN 300 PEOPLE PHASE 2 : 2008-2012 GLOBAL LEADER : + 700 EMPLOYEES! 2007 15 EMPLOYEES 2009 84 EMPLOYEES 6 EMPLOYEES 2005 2010 203 EMPLOYEES 2012 +700 EMPLOYEES SO FAR 2006 2011 395 EMPLOYEES 2008 33 EMPLOYEES
  • 4. INFRASTRUCTURE 4 Copyright © 2013 Criteo. Confidential.  DAILY TRAFFIC - HTTP REQUESTS: 30+ BILLION - BANNERS SERVED: 1+ BILLION  PEAK TRAFFIC (PER SECOND) - HTTP REQUESTS: 500,000+ - BANNERS: 25,000+  7 DATA CENTERS  SET UP AND MANAGED IN-HOUSE  AVAILABILITY > 99.95%
  • 5. 5 Copyright © 2013 Criteo. Confidential. HIGH PERFORMANCE COMPUTING FETCH, STORE, CRUNCH, QUERY 20 additional TB EVERY DAY ? …SUBTITLED « HOW I LEARNED TO STOP WORRYING AND LOVE HPC »
  • 6. CASE STUDY #1: PRODUCT CATALOGUES •  Catalogue = product feed provided by advertisers (product id, description, category, price, URL, etc) •  3000+ catalogues, ranging from a few MB to several tens of GB •  About 50% of products change every day •  Imported at least once a day by an in-house application •  Data replicated within a geographical zone •  Accessed through a cache layer by web servers •  Microsoft SQL Server used from day 1 •  Running fine in Europe, but… –  Number of databases (1 per advertiser)… and servers –  Size of databases –  SQL Server issues hard to debug and understand •  Running kind of fine in the US, until dead end in Q1 2011 –  transactional replication over high latency links Copyright © 2010 Criteo. Confidential.
  • 7. FROM SQL SERVER TO MONGODB •  Ah, database migrations… everyone loves them ! •  1st step: solve replication issue –  Import and replicate catalogues in MongoDB –  Push content to SQL Server, still queried by web servers •  2nd step: prove that MongoDB can survive our web traffic –  Modify web applications to query MongoDB –  C-a-r-e-f-u-l-l-y switch web queries to MongoDB for a small set of catalogues –  Observe, measure, A/B test… and generally make sure that the system still works •  3rd step: scale ! –  Migrate thousands of catalogues away from SQL Server –  Monitor and tweak the MongoDB clusters –  Add more MongoDB servers… and more shards –  Update ops processes (monitoring, backups, etc) •  About 150 MongoDB servers live today (EU/US/APAC) –  Europe: 800M products, 1TB of data, 1 billion requests / day –  Started with 2.0 (+ Criteo patches) " 2.2 " 2.4.3 Copyright © 2010 Criteo. Confidential.
  • 8. MONGODB, 2.5 YEARS LATER •  Stable (2.4.3 much better) •  Easy to (re)install and administer •  Great for small datasets (i.e. smaller than server RAM) •  Good performance if read/write ratio is high •  Failover and inter-DC replication work (but shard early!) •  Performance suffers when : –  dataset much larger than RAM –  read/write ratio is low –  Multiple applications coexist on the same cluster •  Some scalability issues remain (master-slave, connections) •  Criteo is very interested in the 10gen roadmap ! Copyright © 2010 Criteo. Confidential.
  • 9. CASE STUDY #2: HADOOP 9 Copyright © 2013 Criteo. Confidential. 1st cluster live in June 2011 (2 Petabytes) « Express » launch required by brutal growth of traffic Traditional processing (in-house tools + SQL Server) completely replaced by Hadoop Dual-use: production (prediction, recommandation, etc.) and Business Intelligence (reporting, traffic analysis) Visible ROI : Increase of CTR and CR 2nd cluster live in April 2013 (6 Petabytes"?)
  • 10. HADOOP IS AWESOME… BUT CAVEAT EMPTOR! •  Batch processing architecture, not real-time " hence our work on Storm •  Beware how data is organized and presented to jobs (LZO, RCFile, etc) " hence our work on Parquet with Twitter & Cloudera •  namenode = SPOF " backup + HA in CDH4 •  Understand HDFS replication (under-replicated blocks) •  Have a stack of extra hard drives ready •  Lack of ops / prod tools: data import/export, monitoring, metrology, etc •  Lots of work needed for an efficient multi-user setup: scheduling, quotas, etc. •  At scale, infrastructure skills are mandatory –  Server selection, CPU/storage ration –  Linux & Java tuning –  LAN architecture: watch your switches! Copyright © 2010 Criteo. Confidential.
  • 11. THANKS A LOT FOR YOUR ATTENTION! 11 Copyright © 2013 Criteo. Confidential. www.criteo.com engineering.criteo.com