SlideShare una empresa de Scribd logo
1 de 42
Finagle at Pinterest
1
Yongsheng Wu
Email: yongsheng@pinterest.com
Linkedin: www.linkedin.com/in/yongshengwu
Pinterest: www.pinterest.com/yswu
Twitter: @yswu
08-13-2015
2
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Pinterest is solving
the discovery problem.
3
4
5
6
50+ Billion Pins
categorized by people into more than
1 Billion Boards
7
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Pinterest
March, 2010
8
10
Why Finagle?
11
๏Reactive Manifesto
✓Responsive
✓Resilient
✓Elastic
✓Message Driven
๏Efficiency
๏Future Programming Model
๏Visibility
๏Community
Best Practices for Service Migration
12
๏Avoid Changes of Functionalities
๏Test-Driven Development
‣ Unit Test
‣ Integration Test
๏Dark Traffic
‣ Comparison
‣ Capacity
๏Light Traffic
Pin Creation
13
14
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Service Proxy
15
Service Proxy
16
Service Proxy Request Logging
17
๏Request logging automatically handled by proxy
‣ Sampled Access Logging
‣ Sampled Slow Request Logging
‣ Sampled Failure Request Logging
๏Log format
Service Proxy Request Logging
18
๏Request logging automatically handled by proxy
‣ Sampled Access Logging
‣ Sampled Slow Request Logging
‣ Sampled Failure Request Logging
๏Log format
Service Proxy Request Logging
19
๏Request logging automatically handled by proxy
‣ Sampled Access Logging
‣ Sampled Slow Request Logging
‣ Sampled Failure Request Logging
๏Log format
Service Proxy Request Logging
20
๏Request logging automatically handled by proxy
‣ Sampled Access Logging
‣ Sampled Slow Request Logging
‣ Sampled Failure Request Logging
๏Log format
Service Proxy Request Logging
21
๏Request logging automatically handled by proxy
‣ Sampled Access Logging
‣ Sampled Slow Request Logging
‣ Sampled Failure Request Logging
๏Log format
Service Exception Monitoring
22
Service Proxy Metrics
23
Service Proxy Metrics
24
Service Proxy Metrics
25
Service Proxy Rate Limiting
26
๏Guava RateLimiter (Token Bucket based) and ServerSet
๏No coordination among servers in the cluster
๏Rate limiting rules
๏Max QPS to service
๏Max QPS to a particular API endpoint
๏Max QPS from a specific client to service
๏Max QPS from a specific client to a particular API
endpoint
27
28
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Dynamic Service Discovery
29
Dynamic Service Discovery
30
Dynamic Service Discovery
31
32
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Finagle Thrift Protocol
33
Finagle Thrift Protocol
34
35
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Genesis
36
๏Interactive Q&A Shell
๏Finagle Server and Client Generation
‣ Existing thrift IDL
๏Python Thrift Client Generation
๏Statsboard Generation
‣ System Metrics (CPU, Memory, Network, Disk)
‣ Finagle Stats (requests, failures, GC)
‣ Per API Endpoint Stats
‣ QPS
‣ Failure Count
‣ Latency
Genesis
37
Genesis
38
Genesis
39
40
Introduction of Pinterest
SOA
Service Proxy
Dynamic Service Discovery
Python Finagle Thrift Client
Genesis
Future Challenges
41
๏Unified Data Model, Partial Retrieval
๏One-step Service Generation
๏Distributed Tracing
๏Auto-scaling
๏Cell-based Architecture
๏MUX, HTTP/2
๏… ….
FinagleCon_2015_Pinterest

Más contenido relacionado

La actualidad más candente

La actualidad más candente (8)

Smart Contracts: From Zero to Dapp Hero | Hedera18
Smart Contracts: From Zero to Dapp Hero | Hedera18Smart Contracts: From Zero to Dapp Hero | Hedera18
Smart Contracts: From Zero to Dapp Hero | Hedera18
 
Kafka Streams
Kafka StreamsKafka Streams
Kafka Streams
 
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hopeMicroservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
 
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
 
What’s New with Flowable?
What’s New with Flowable?What’s New with Flowable?
What’s New with Flowable?
 
Trading Derivatives on Hyperledger
Trading Derivatives on HyperledgerTrading Derivatives on Hyperledger
Trading Derivatives on Hyperledger
 
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
 
Analysing your web traffic with real time statistics
Analysing your web traffic with real time statisticsAnalysing your web traffic with real time statistics
Analysing your web traffic with real time statistics
 

Destacado

Udidac tic sac30
Udidac tic sac30Udidac tic sac30
Udidac tic sac30
sac30
 
Ciberseguridad, la asignatura pendiente.
Ciberseguridad, la asignatura pendiente.Ciberseguridad, la asignatura pendiente.
Ciberseguridad, la asignatura pendiente.
APD Asociación para el Progreso de la Dirección
 
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
Tobias McVey
 
Published patent and design registration information december 14th, 2012
Published patent and design registration information   december 14th, 2012Published patent and design registration information   december 14th, 2012
Published patent and design registration information december 14th, 2012
InvnTree IP Services Pvt. Ltd.
 
Sargasso Company Presentation EN
Sargasso Company Presentation ENSargasso Company Presentation EN
Sargasso Company Presentation EN
Joao Bola
 
Carola Vives paisajismo y jardinería- prensa
Carola Vives  paisajismo y jardinería-  prensaCarola Vives  paisajismo y jardinería-  prensa
Carola Vives paisajismo y jardinería- prensa
Carola Vives
 
Jungheinrich Company Presentation
Jungheinrich Company PresentationJungheinrich Company Presentation
Jungheinrich Company Presentation
Company Spotlight
 
Mundo de arena
Mundo de arena Mundo de arena
Mundo de arena
analuace03
 

Destacado (20)

Udidac tic sac30
Udidac tic sac30Udidac tic sac30
Udidac tic sac30
 
Ciberseguridad, la asignatura pendiente.
Ciberseguridad, la asignatura pendiente.Ciberseguridad, la asignatura pendiente.
Ciberseguridad, la asignatura pendiente.
 
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
Tobias McVey Opera Software Big Data for LinkMedical Mars 2016
 
Published patent and design registration information december 14th, 2012
Published patent and design registration information   december 14th, 2012Published patent and design registration information   december 14th, 2012
Published patent and design registration information december 14th, 2012
 
Webinar: Herramientas de Autor para el diseño de OA para EaD
Webinar: Herramientas de Autor para el diseño de OA para EaD Webinar: Herramientas de Autor para el diseño de OA para EaD
Webinar: Herramientas de Autor para el diseño de OA para EaD
 
Sargasso Company Presentation EN
Sargasso Company Presentation ENSargasso Company Presentation EN
Sargasso Company Presentation EN
 
Graffitis sexto a
Graffitis sexto aGraffitis sexto a
Graffitis sexto a
 
ISD2016_Solution_G_Stefan_Reiner
ISD2016_Solution_G_Stefan_ReinerISD2016_Solution_G_Stefan_Reiner
ISD2016_Solution_G_Stefan_Reiner
 
Carola Vives paisajismo y jardinería- prensa
Carola Vives  paisajismo y jardinería-  prensaCarola Vives  paisajismo y jardinería-  prensa
Carola Vives paisajismo y jardinería- prensa
 
(60kz) Taller de Origami
(60kz) Taller de Origami(60kz) Taller de Origami
(60kz) Taller de Origami
 
Jungheinrich Company Presentation
Jungheinrich Company PresentationJungheinrich Company Presentation
Jungheinrich Company Presentation
 
Mundo de arena
Mundo de arena Mundo de arena
Mundo de arena
 
Como Prepararse para la Inspección Orgánica
Como Prepararse para la Inspección OrgánicaComo Prepararse para la Inspección Orgánica
Como Prepararse para la Inspección Orgánica
 
Preguntas Frecuentes GPSur
Preguntas Frecuentes GPSurPreguntas Frecuentes GPSur
Preguntas Frecuentes GPSur
 
Anti- taurino!
Anti- taurino!Anti- taurino!
Anti- taurino!
 
Pipe Marker Catalog - Project Sales Corp
Pipe Marker Catalog - Project Sales CorpPipe Marker Catalog - Project Sales Corp
Pipe Marker Catalog - Project Sales Corp
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabble
 
Jaime calderón
Jaime calderónJaime calderón
Jaime calderón
 
Rene Caldera Capitulo 2 Palpadores y Generación de Ultrasonido
Rene Caldera Capitulo 2 Palpadores y Generación de UltrasonidoRene Caldera Capitulo 2 Palpadores y Generación de Ultrasonido
Rene Caldera Capitulo 2 Palpadores y Generación de Ultrasonido
 
Titan Brochure
Titan BrochureTitan Brochure
Titan Brochure
 

Similar a FinagleCon_2015_Pinterest

Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Eduards Sizovs
 

Similar a FinagleCon_2015_Pinterest (20)

apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
 
Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIs
 
2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
 
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
WSO2- OSC Korea - Accelerating Digital Businesses with APIsWSO2- OSC Korea - Accelerating Digital Businesses with APIs
WSO2- OSC Korea - Accelerating Digital Businesses with APIs
 
Netflix factstore for recommendations - 2018
Netflix factstore  for recommendations - 2018Netflix factstore  for recommendations - 2018
Netflix factstore for recommendations - 2018
 
Fact Store at Scale for Netflix Recommendations with Nitin Sharma and Kedar S...
Fact Store at Scale for Netflix Recommendations with Nitin Sharma and Kedar S...Fact Store at Scale for Netflix Recommendations with Nitin Sharma and Kedar S...
Fact Store at Scale for Netflix Recommendations with Nitin Sharma and Kedar S...
 
Fact Store at Scale for Netflix Recommendations
Fact Store at Scale for Netflix RecommendationsFact Store at Scale for Netflix Recommendations
Fact Store at Scale for Netflix Recommendations
 
Netflix Recommendations - Fact Store
Netflix Recommendations - Fact Store Netflix Recommendations - Fact Store
Netflix Recommendations - Fact Store
 
PayPal Risk Platform High Performance Practice
PayPal Risk Platform High Performance PracticePayPal Risk Platform High Performance Practice
PayPal Risk Platform High Performance Practice
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
 
MSB Deep Dive
MSB Deep DiveMSB Deep Dive
MSB Deep Dive
 
Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...
Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...
Beam summit 2019 - Unifying Batch and Stream Data Processing with Apache Calc...
 
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
 
Python vs JLizard.... a python logging experience
Python vs JLizard.... a python logging experiencePython vs JLizard.... a python logging experience
Python vs JLizard.... a python logging experience
 
Digital Transformation for Karnataka Bank Through API-led Integration
Digital Transformation for Karnataka Bank Through API-led IntegrationDigital Transformation for Karnataka Bank Through API-led Integration
Digital Transformation for Karnataka Bank Through API-led Integration
 
Realtime stream processing with kafka
Realtime stream processing with kafkaRealtime stream processing with kafka
Realtime stream processing with kafka
 
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
Blueprint Series: Architecture Patterns for Implementing Serverless Microserv...
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

FinagleCon_2015_Pinterest

Notas del editor

  1. About me: Joined 3 years ago, early engineer on Infra team at Pinterest Storage systems on Twitter’s core data sets: users, tweets, social graph CRM, Chatter, Platform as a Service at Salesforce
  2. Pinterest if you want to be inspired, you want to discover What should I have for lunch? What art pieces I may love? Emphasize “Picked for you”
  3. Explore what may interest you. Explore interests, related interests, discover things. Follow interests
  4. Discovery at scale
  5. Why SOA???
  6. 3 founders (Ben, Evan, and Paul), 1 engineer (Yash)
  7. December, 2014 Currently 600+ employees, 200+ engineers We are scaling our organization really rapidly
  8. We want to foster long term ownership. Accountability. SLA
  9. Responsive: timeout setting possible at many levels Resilient: retries, connection pooling, bad host detection/eviction/retry, queue policies Elastic: dynamic service discovery Message Driven: Async RPC, thrift, protobuf, http, memcache, redis, etc. Efficiency: not Python (slow, not static type checked, single process, single request handling), JVM based platform, tens of thousands QPS per host Future: better than callbacks, way better than java future back in the days Community: very well supported, plus we know the committers :-)
  10. For both dark and light stages, a mechanism can easily dial up/down the traffic to the new service is a key component of the system. dark traffic most of time will cause additional load, so capacity needs to be watched closely in some cases; while light traffic and traffic to original service are typically exclusive to each other, no such a concern in most cases.
  11. Today we have ~100 services on prod, majority of them are finagle based, but we also have services in goLang, c++, and python. There are challenges, we want to build the same framework features for all platforms, but it takes time and effort.
  12. Use Java Dynamic Proxy for code injection
  13. sampled access logging, slow request logging, and failed request logging. make it much easier for the service owners to debug and monitor their services.
  14. Dimensions: client, server host, api endpoint, exception type
  15. massive productivity gain: several hours down to a couple of minutes good investment for team if creating a lot of services, also a building block for one-step service generation Shell: JLine2, autocompletion of file path; FB Swift for thrift IDL parsing, Python ptsd package for thrift IDL parsing
  16. screenshots of statsboard generated, finagle server/client generation, thrift client generation
  17. screenshots of statsboard generated, finagle server/client generation, thrift client generation
  18. Recap