SlideShare una empresa de Scribd logo
1 de 29
Cedrick MONTOUT
2016 June 8th
A story about C# @ Criteo
Why do we reinvent
the wheel ?
2 | Copyright © 2016 Criteo
• Criteo
• Global leader on retargeting
• Scalability
• One of many groups in the Criteo R&D department
• WebScale
• We write code to help scale up the real-time Criteo Platform
• https://www.linkedin.com/in/kerdrek
• https://github.com/kerdrek
• @kerdrek
Who am I ?
Client Side Load Balancing
4 | Copyright © 2016 Criteo
The situation then … 1/5
Footer:
App A Pool App B Pool
HA Proxy
Service Pool
5 | Copyright © 2016 Criteo
The situation then … 2/5
Footer:
App A Pool App B Pool
HA Proxy
Service Pool
Random DC Service Pool
Traffic 185k QPS
Input size ~5K bytes
Output size ~3,5K bytes
Network traffic ~12Gbits/s
6 | Copyright © 2016 Criteo
The situation then … 3/5
Footer:
App A Pool App B Pool
HA Proxy
Service Pool
Random DC Service Pool
Traffic 185k QPS
Input size ~5K bytes
Output size ~3,5K bytes
Network traffic ~12Gbits/s
Compression
30% gain
7 | Copyright © 2016 Criteo
The situation then … 4/5
Footer:
App A Pool App B Pool
HA Proxy
Service Pool
Random DC Service Pool
Traffic 185k QPS
Input size ~5K bytes
Output size ~3,5K bytes
Network traffic ~12Gbits/s
Compression
30% gain
Bonding 2 ports
Combine two physical data links into one logical link, by
connecting 2 ports of the switch to 2 network interfaces
of the HAProxy
8 | Copyright © 2016 Criteo
The situation then … 5/5
Footer:
App A Pool App B Pool
HA Proxy
Service Pool
Random DC Service Pool
Traffic 185k QPS
Input size ~5K bytes
Output size ~3,5K bytes
Network traffic ~12Gbits/s
Compression
30% gain
Bonding 2 ports
Combine two physical data links into one logical link, by
connecting 2 ports of the switch to 2 network interfaces
of the HAProxy
4 pairs
9 | Copyright © 2016 Criteo
The new wheel : Client Side Load Balancing
• Bypass HA Proxy
• Implemented inside Twitter/Finagle
• Reuse existing health Check
• Re-implement monitoring
App Pool A App Pool B
Service Pool
DevHost
11 | Copyright © 2016 Criteo
The situation then …
Footer:
• Harder and harder to release
• No available memory for new feature
• Fragmented feature in production
• Tightly coupled with the HTTP stack
12 | Copyright © 2016 Criteo
The new wheel: Component
• One Input
• One Output
• On Process
13 | Copyright © 2016 Criteo
The new wheel: A Host with Services
• A collection of services
14 | Copyright © 2016 Criteo
The new wheel: DevHost
• The DevHost
• Several Components
• Several Services
• Asynchronous Process
• Transport agnostic
• Not front facing
15 | Copyright © 2016 Criteo
The new wheel: DevHost
• Still use in production
• ~45% of the windows production machine
• Next iteration will use .net core (WiP)
Monitoring @ Task level
17 | Copyright © 2016 Criteo
• Synchronous processing everywhere
• Timeout on several pipeline (loosing money)
• No clear diagnostic on execution path
The situation then …
Footer:
18 | Copyright © 2016 Criteo
The new Wheel : Asynchronous Token Framework
• TPL was not a solution at that time
• Asynchronous Completion Token
• Delegate based
• Execution is time boxed
• Task underneath
• Timing for every thing
• Metrics available on the machine
• Metrics available aggregated on Graphite
Apache Kafka Driver in C#
20 | Copyright © 2016 Criteo
The situation then …
Footer:
• Syslog
• Text based
• Fire and Forget
• Single messages
• No built-in resiliency
• No API for consuming
21 | Copyright © 2016 Criteo
The situation then …
Footer:
• Apache Kafka
• Binary
• Acknowledged message
• Batched messages
• Partitioning and replication
• Consuming support
• Syslog
• Text based
• Fire and Forget
• Single messages
• No built-in resiliency
• No API for consuming
22 | Copyright © 2016 Criteo
Apache Kafka where is your C# driver ?
We looked at several drivers
23 | Copyright © 2016 Criteo
Goldilocks Conundrum all over again
We looked at several drivers
First driver never used in production
24 | Copyright © 2016 Criteo
Goldilocks Conundrum all over again
We looked at several drivers
First driver never used in production
Second driver was impossible to unit test
25 | Copyright © 2016 Criteo
Goldilocks Conundrum all over again
We looked at several drivers
First driver never used in production
Second driver was impossible to unit test
Third driver was not recently maintained
26 | Copyright © 2016 Criteo
The new Wheel: kafka-sharp
• Yet another C# driver
• Highly tuneable
• Written with perf and scale in mind
• Battle tested in production
• Available here: https://github.com/criteo/kafka-sharp
27 | Copyright © 2016 Criteo
The wheel lists
• Distributed load balancer between clients.
• Lightweight hosting server.
• Low level asynchronous execution framework.
• Yet another C# driver for Apache Kafka.
28 | Copyright © 2016 Criteo
Click to add text

Más contenido relacionado

La actualidad más candente

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 

La actualidad más candente (20)

Quick workflow of a nodejs api
Quick workflow of a nodejs apiQuick workflow of a nodejs api
Quick workflow of a nodejs api
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)
 
GitOps with Gitkube
GitOps with GitkubeGitOps with Gitkube
GitOps with Gitkube
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCDDevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
 
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
CNCF: Cross-cloud CI v1.0.0 Dashboard Release 2018-01-26
 
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
GitLab Frontend and VueJS at GitLab
GitLab Frontend and VueJS at GitLabGitLab Frontend and VueJS at GitLab
GitLab Frontend and VueJS at GitLab
 
Introduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesIntroduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetes
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
Docker New York City: From GitOps to a scalable CI/CD Pattern for Kubernetes
Docker New York City: From GitOps to a scalable CI/CD Pattern for KubernetesDocker New York City: From GitOps to a scalable CI/CD Pattern for Kubernetes
Docker New York City: From GitOps to a scalable CI/CD Pattern for Kubernetes
 
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyerCase Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
 
Importance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCPImportance of GCP: 30 Days of GCP
Importance of GCP: 30 Days of GCP
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
 
Knative CloudEvents
Knative CloudEventsKnative CloudEvents
Knative CloudEvents
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 

Destacado

Introduction Criteo - 2.0
Introduction Criteo - 2.0Introduction Criteo - 2.0
Introduction Criteo - 2.0
Scott Turecek
 
EN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrandEN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrand
Djilali Zitouni
 
criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015
Carolyn Bednarz
 
Criteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
Criteo's Ad Week 2012 presentation - Big Data and the Value of ClickersCriteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
Criteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
Criteo
 
STRATEGIC BUYER LUMAscape
STRATEGIC BUYER LUMAscape STRATEGIC BUYER LUMAscape
STRATEGIC BUYER LUMAscape
LUMA Partners
 

Destacado (16)

Introduction Criteo - 2.0
Introduction Criteo - 2.0Introduction Criteo - 2.0
Introduction Criteo - 2.0
 
EN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrandEN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrand
 
Criteo. Reach people, not devices!
Criteo. Reach people, not devices!Criteo. Reach people, not devices!
Criteo. Reach people, not devices!
 
New challenges for scalable machine learning in online advertising
New challenges for scalable machine learning in online advertisingNew challenges for scalable machine learning in online advertising
New challenges for scalable machine learning in online advertising
 
Making advertising personal, 4th NL Recommenders Meetup
Making advertising personal, 4th NL Recommenders MeetupMaking advertising personal, 4th NL Recommenders Meetup
Making advertising personal, 4th NL Recommenders Meetup
 
Couchbase live 2016
Couchbase live 2016Couchbase live 2016
Couchbase live 2016
 
RecsysFR: Criteo presentation
RecsysFR: Criteo presentationRecsysFR: Criteo presentation
RecsysFR: Criteo presentation
 
criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015
 
Средний чек как показатель эффективности персонала аптеки
Средний чек как показатель эффективности персонала аптекиСредний чек как показатель эффективности персонала аптеки
Средний чек как показатель эффективности персонала аптеки
 
Criteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
Criteo's Ad Week 2012 presentation - Big Data and the Value of ClickersCriteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
Criteo's Ad Week 2012 presentation - Big Data and the Value of Clickers
 
RecSys 2015: Large-scale real-time product recommendation at Criteo
RecSys 2015: Large-scale real-time product recommendation at CriteoRecSys 2015: Large-scale real-time product recommendation at Criteo
RecSys 2015: Large-scale real-time product recommendation at Criteo
 
Criteo - NOAH13 London
Criteo - NOAH13 LondonCriteo - NOAH13 London
Criteo - NOAH13 London
 
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
 
LUMA Digital Brief 012 - Market Report Q4 2016
LUMA Digital Brief 012 - Market Report Q4 2016LUMA Digital Brief 012 - Market Report Q4 2016
LUMA Digital Brief 012 - Market Report Q4 2016
 
STRATEGIC BUYER LUMAscape
STRATEGIC BUYER LUMAscape STRATEGIC BUYER LUMAscape
STRATEGIC BUYER LUMAscape
 
DISPLAY LUMAscape
DISPLAY LUMAscapeDISPLAY LUMAscape
DISPLAY LUMAscape
 

Similar a Why reinvent the wheel at Criteo?

Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
Christian Posta
 
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
HostedbyConfluent
 

Similar a Why reinvent the wheel at Criteo? (20)

DataEngConf: Apache Kafka at Rocana: a scalable, distributed log for machine ...
DataEngConf: Apache Kafka at Rocana: a scalable, distributed log for machine ...DataEngConf: Apache Kafka at Rocana: a scalable, distributed log for machine ...
DataEngConf: Apache Kafka at Rocana: a scalable, distributed log for machine ...
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data Plane
 
Http Services in Rust on Containers
Http Services in Rust on ContainersHttp Services in Rust on Containers
Http Services in Rust on Containers
 
Fluent 2018: Tracking Performance of the Web with HTTP Archive
Fluent 2018: Tracking Performance of the Web with HTTP ArchiveFluent 2018: Tracking Performance of the Web with HTTP Archive
Fluent 2018: Tracking Performance of the Web with HTTP Archive
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ Criteo
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
01282016 Aerospike-Docker webinar
01282016 Aerospike-Docker webinar01282016 Aerospike-Docker webinar
01282016 Aerospike-Docker webinar
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
Running Consul on Kubernetes and Beyond
Running Consul on Kubernetes and BeyondRunning Consul on Kubernetes and Beyond
Running Consul on Kubernetes and Beyond
 
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
Verifying Apache Kafka-Based Data Pipelines With Subhangi Agarwala | Current ...
 
What You Missed: Red Hat Summit 2016
What You Missed: Red Hat Summit 2016 What You Missed: Red Hat Summit 2016
What You Missed: Red Hat Summit 2016
 
Couchbase Connect 2016: Monitoring Production Deployments The Tools – LinkedIn
Couchbase Connect 2016: Monitoring Production Deployments The Tools – LinkedInCouchbase Connect 2016: Monitoring Production Deployments The Tools – LinkedIn
Couchbase Connect 2016: Monitoring Production Deployments The Tools – LinkedIn
 
Kafka Practices @ Uber - Seattle Apache Kafka meetup
Kafka Practices @ Uber - Seattle Apache Kafka meetupKafka Practices @ Uber - Seattle Apache Kafka meetup
Kafka Practices @ Uber - Seattle Apache Kafka meetup
 
Using the SDACK Architecture on Security Event Inspection by Yu-Lun Chen and ...
Using the SDACK Architecture on Security Event Inspection by Yu-Lun Chen and ...Using the SDACK Architecture on Security Event Inspection by Yu-Lun Chen and ...
Using the SDACK Architecture on Security Event Inspection by Yu-Lun Chen and ...
 
Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx
Kubernetes sidecar pattern as a swiss-army knife for microservices.pptxKubernetes sidecar pattern as a swiss-army knife for microservices.pptx
Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
How do async ap is survive in a rest world
How do async ap is survive in a rest world How do async ap is survive in a rest world
How do async ap is survive in a rest world
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Framework
 

Último

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Último (20)

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Why reinvent the wheel at Criteo?

  • 1. Cedrick MONTOUT 2016 June 8th A story about C# @ Criteo Why do we reinvent the wheel ?
  • 2. 2 | Copyright © 2016 Criteo • Criteo • Global leader on retargeting • Scalability • One of many groups in the Criteo R&D department • WebScale • We write code to help scale up the real-time Criteo Platform • https://www.linkedin.com/in/kerdrek • https://github.com/kerdrek • @kerdrek Who am I ?
  • 3. Client Side Load Balancing
  • 4. 4 | Copyright © 2016 Criteo The situation then … 1/5 Footer: App A Pool App B Pool HA Proxy Service Pool
  • 5. 5 | Copyright © 2016 Criteo The situation then … 2/5 Footer: App A Pool App B Pool HA Proxy Service Pool Random DC Service Pool Traffic 185k QPS Input size ~5K bytes Output size ~3,5K bytes Network traffic ~12Gbits/s
  • 6. 6 | Copyright © 2016 Criteo The situation then … 3/5 Footer: App A Pool App B Pool HA Proxy Service Pool Random DC Service Pool Traffic 185k QPS Input size ~5K bytes Output size ~3,5K bytes Network traffic ~12Gbits/s Compression 30% gain
  • 7. 7 | Copyright © 2016 Criteo The situation then … 4/5 Footer: App A Pool App B Pool HA Proxy Service Pool Random DC Service Pool Traffic 185k QPS Input size ~5K bytes Output size ~3,5K bytes Network traffic ~12Gbits/s Compression 30% gain Bonding 2 ports Combine two physical data links into one logical link, by connecting 2 ports of the switch to 2 network interfaces of the HAProxy
  • 8. 8 | Copyright © 2016 Criteo The situation then … 5/5 Footer: App A Pool App B Pool HA Proxy Service Pool Random DC Service Pool Traffic 185k QPS Input size ~5K bytes Output size ~3,5K bytes Network traffic ~12Gbits/s Compression 30% gain Bonding 2 ports Combine two physical data links into one logical link, by connecting 2 ports of the switch to 2 network interfaces of the HAProxy 4 pairs
  • 9. 9 | Copyright © 2016 Criteo The new wheel : Client Side Load Balancing • Bypass HA Proxy • Implemented inside Twitter/Finagle • Reuse existing health Check • Re-implement monitoring App Pool A App Pool B Service Pool
  • 11. 11 | Copyright © 2016 Criteo The situation then … Footer: • Harder and harder to release • No available memory for new feature • Fragmented feature in production • Tightly coupled with the HTTP stack
  • 12. 12 | Copyright © 2016 Criteo The new wheel: Component • One Input • One Output • On Process
  • 13. 13 | Copyright © 2016 Criteo The new wheel: A Host with Services • A collection of services
  • 14. 14 | Copyright © 2016 Criteo The new wheel: DevHost • The DevHost • Several Components • Several Services • Asynchronous Process • Transport agnostic • Not front facing
  • 15. 15 | Copyright © 2016 Criteo The new wheel: DevHost • Still use in production • ~45% of the windows production machine • Next iteration will use .net core (WiP)
  • 17. 17 | Copyright © 2016 Criteo • Synchronous processing everywhere • Timeout on several pipeline (loosing money) • No clear diagnostic on execution path The situation then … Footer:
  • 18. 18 | Copyright © 2016 Criteo The new Wheel : Asynchronous Token Framework • TPL was not a solution at that time • Asynchronous Completion Token • Delegate based • Execution is time boxed • Task underneath • Timing for every thing • Metrics available on the machine • Metrics available aggregated on Graphite
  • 20. 20 | Copyright © 2016 Criteo The situation then … Footer: • Syslog • Text based • Fire and Forget • Single messages • No built-in resiliency • No API for consuming
  • 21. 21 | Copyright © 2016 Criteo The situation then … Footer: • Apache Kafka • Binary • Acknowledged message • Batched messages • Partitioning and replication • Consuming support • Syslog • Text based • Fire and Forget • Single messages • No built-in resiliency • No API for consuming
  • 22. 22 | Copyright © 2016 Criteo Apache Kafka where is your C# driver ? We looked at several drivers
  • 23. 23 | Copyright © 2016 Criteo Goldilocks Conundrum all over again We looked at several drivers First driver never used in production
  • 24. 24 | Copyright © 2016 Criteo Goldilocks Conundrum all over again We looked at several drivers First driver never used in production Second driver was impossible to unit test
  • 25. 25 | Copyright © 2016 Criteo Goldilocks Conundrum all over again We looked at several drivers First driver never used in production Second driver was impossible to unit test Third driver was not recently maintained
  • 26. 26 | Copyright © 2016 Criteo The new Wheel: kafka-sharp • Yet another C# driver • Highly tuneable • Written with perf and scale in mind • Battle tested in production • Available here: https://github.com/criteo/kafka-sharp
  • 27. 27 | Copyright © 2016 Criteo The wheel lists • Distributed load balancer between clients. • Lightweight hosting server. • Low level asynchronous execution framework. • Yet another C# driver for Apache Kafka.
  • 28. 28 | Copyright © 2016 Criteo
  • 29. Click to add text

Notas del editor

  1. What happens when traditional load balancing is too costly to scale ?
  2. One app server will be partially connected to all or parts of the Service Pool. Because It was already re-invented by twitter in the Finagle we knew it was possible we re-implemented the monitoring on a distributed manner We re-use the health check already in place for HA Proxy benefit
  3. What about migrating monolithic application to service oriented when you have spaghetti code ? The service pool was not always like that, in fact in the past all service were inside the app process.
  4. Some Api were asking for the whole HttpContext when they only needed a few parameters transported in the query string or in the cookies
  5. One Input converted from a byteArray One Output converted to a byteArray On Process that ingest an input and produce an output
  6. You should monitor everything right ? But can you and should you measure and monitor your code down to the task level on your production machines.
  7. Apache Kafka looks good and you want to use it but is there any good enough implementation in C# ?
  8. We will not name names
  9. We will not name names
  10. We will not name names
  11. We will not name names