SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie FinagleCon_2015_Pinterest

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

Ähnlich wie 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
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"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 ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

FinagleCon_2015_Pinterest

Hinweis der Redaktion

  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