SlideShare a Scribd company logo
1 of 26
Download to read offline
The Twitter Stack
Finagle, Ostrich, Zipkin,ā€¦
Dominik Gruber, @the_dom
Vienna Scala User Group ā€“ Aug. 27, 2014
Dominik Gruber ā€¢ @the_domTwitter Stack
Agenda
ā€¢ Introduction
ā€¢ Prominent Adopters
ā€¢ Finagle
ā€¢ Ostrich
ā€¢ Zipkin
ā€¢ Iago
ā€¢ Finatra
Dominik Gruber ā€¢ @the_domTwitter Stack
Introduction
ā€¢ Twitter started to move oļ¬€ Ruby on Rails in 2010
ā€¢ Currently still on Scala 2.9
Dominik Gruber ā€¢ @the_domTwitter Stack
Prominent Adopters
ā€¢ Box
ā€¢ eBay
ā€¢ Etsy
ā€¢ Foursquare
ā€¢ Gigya
ā€¢ Nest
ā€¢ Pinterest
ā€¢ Rdio
ā€¢ SoundCloud
ā€¢ Tumblr
Dominik Gruber ā€¢ @the_domTwitter Stack
Dominik Gruber ā€¢ @the_domTwitter Stack
Finagle
ā€œFinagle is an extensible RPC system for the
JVM, used to construct high-concurrency
servers. Finagle implements uniform client
and server APIs for several protocols, and is
designed for high performance and
concurrency. Most of Finagleā€™s code is
protocol agnostic, simplifying the
implementation of new protocols.ā€
Dominik Gruber ā€¢ @the_domTwitter Stack
Finagle providesā€¦
ā€¢ Connection pools
ā€¢ Failure detection
ā€¢ Failover strategies
ā€¢ Load balancers
ā€¢ Back-pressure techniques
Dominik Gruber ā€¢ @the_domTwitter Stack
Finagleā€¦
ā€¢ publishes standard statistics, logs, and exception
reports
ā€¢ supports distributed tracing across protocols
ā€¢ optionally uses ZooKeeper for cluster management
ā€¢ supports common sharding strategies
Dominik Gruber ā€¢ @the_domTwitter Stack
Modules (Examples)
ā€¢ finagle-http
ā€¢ finagle-memcached
ā€¢ finagle-mysql
ā€¢ finagle-protobuf
ā€¢ finagle-redis
ā€¢ finagle-thrift
Dominik Gruber ā€¢ @the_domTwitter Stack
Basic abstractions
ā€¢ Future
ā€¢ Service
ā€¢ Filter
Dominik Gruber ā€¢ @the_domTwitter Stack
Ostrich
Dominik Gruber ā€¢ @the_domTwitter Stack
Ostrich
ā€¢ A stats collector & reporter
ā€¢ Collect runtime statistics (counters, gauges, metrics,
and labels)
ā€¢ Report those statistics through a simple web
interface or into log ļ¬les
ā€¢ Similar to Metricsā€Ø
https://github.com/dropwizard/metrics
Dominik Gruber ā€¢ @the_domTwitter Stack
Dominik Gruber ā€¢ @the_domTwitter Stack
Zipkin
ā€œZipkin is a distributed tracing system that
helps us gather timing data for all the
disparate services at Twitter. It manages both
the collection and lookup of this data through
a Collector and a Query service.ā€
Dominik Gruber ā€¢ @the_domTwitter Stack
Zipkin
Dominik Gruber ā€¢ @the_domTwitter Stack
Zipkinā€™s Architecture
Dominik Gruber ā€¢ @the_domTwitter Stack
Zipkin
ā€¢ ā€œScribeā€ to transport traces to Zipkin and Hadoop
ā€¢ Data stored in either Cassandra, Redis, HBase,
MySQL, PostgreSQL, SQLite, or H2
Dominik Gruber ā€¢ @the_domTwitter Stack
Iago
Dominik Gruber ā€¢ @the_domTwitter Stack
Iago
ā€¢ A load generator that replays production or synthetic
traļ¬ƒc
ā€¢ Iago supports arbitrarily high rates of traļ¬ƒc via built-
in support for creating cluster
Dominik Gruber ā€¢ @the_domTwitter Stack
Protocols
ā€¢ HTTP
ā€¢ Thrift
ā€¢ Memcache
ā€¢ Kestrel (A queueing system from Twitter)
ā€¢ UDP
Dominik Gruber ā€¢ @the_domTwitter Stack
Finatra
Dominik Gruber ā€¢ @the_domTwitter Stack
Dominik Gruber ā€¢ @the_domTwitter Stack
Features
ā€¢ Fully Async using Futures
ā€¢ Mustache Templates
ā€¢ Detailed Metrics (p99,p999, etc)
ā€¢ Proļ¬le/Debug over HTTP
ā€¢ SSL/TLS Support
ā€¢ Deploys with a single jar
Dominik Gruber ā€¢ @the_domTwitter Stack
Thereā€™s moreā€¦
ā€¢
ā€¢ Summingbird
ā€¢ https://github.com/twitter
Dominik Gruber ā€¢ @the_domTwitter Stack
Q & A
Dominik Gruber ā€¢ @the_domTwitter Stack
Source
ā€¢ http://blog.oskarsson.nu/post/40196324612/the-
twitter-stackā€Ø
https://blog.twitter.com/2011/ļ¬nagle-a-protocol-
agnostic-rpc-system
ā€¢ https://www.youtube.com/watch?v=whuT_-cFb5Iā€Ø
https://www.youtube.com/watch?v=QdER-Zl_YCM
ā€¢ https://github.com/twitterā€Ø
https://github.com/ļ¬nagle

More Related Content

Viewers also liked

Technical Seminar PPT
Technical Seminar PPTTechnical Seminar PPT
Technical Seminar PPT
Kshitiz_Vj
Ā 

Viewers also liked (12)

IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
Ā 
Microservices architecture examples
Microservices architecture examplesMicroservices architecture examples
Microservices architecture examples
Ā 
Distributed Tracing with OpenTracing, ZipKin and Kubernetes
Distributed Tracing with OpenTracing, ZipKin and KubernetesDistributed Tracing with OpenTracing, ZipKin and Kubernetes
Distributed Tracing with OpenTracing, ZipKin and Kubernetes
Ā 
Microservices Tracing With Spring Cloud and Zipkin @CybercomDEV
Microservices Tracing With Spring Cloud and Zipkin @CybercomDEVMicroservices Tracing With Spring Cloud and Zipkin @CybercomDEV
Microservices Tracing With Spring Cloud and Zipkin @CybercomDEV
Ā 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
Ā 
Microservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and ZipkinMicroservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and Zipkin
Ā 
Monitoring Microservices
Monitoring MicroservicesMonitoring Microservices
Monitoring Microservices
Ā 
Technical Seminar PPT
Technical Seminar PPTTechnical Seminar PPT
Technical Seminar PPT
Ā 
Dockercon State of the Art in Microservices
Dockercon State of the Art in MicroservicesDockercon State of the Art in Microservices
Dockercon State of the Art in Microservices
Ā 
Advantages and Disadvantages of Technology
Advantages and Disadvantages of TechnologyAdvantages and Disadvantages of Technology
Advantages and Disadvantages of Technology
Ā 
Implementing microservices tracing with spring cloud and zipkin (spring one)
Implementing microservices tracing with spring cloud and zipkin (spring one)Implementing microservices tracing with spring cloud and zipkin (spring one)
Implementing microservices tracing with spring cloud and zipkin (spring one)
Ā 
Technology powerpoint presentations
Technology powerpoint presentationsTechnology powerpoint presentations
Technology powerpoint presentations
Ā 

Recently uploaded

+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@
Ā 
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
Ā 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
Ā 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Ā 
+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...
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
Ā 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Ā 
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
Ā 
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
Ā 
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
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 
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
Ā 
"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 ...
Ā 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Ā 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
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
Ā 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Ā 
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
Ā 
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...
Ā 

2014-08-27 | The Twitter Stack (Vienna Scala User Group)

  • 1. The Twitter Stack Finagle, Ostrich, Zipkin,ā€¦ Dominik Gruber, @the_dom Vienna Scala User Group ā€“ Aug. 27, 2014
  • 2. Dominik Gruber ā€¢ @the_domTwitter Stack Agenda ā€¢ Introduction ā€¢ Prominent Adopters ā€¢ Finagle ā€¢ Ostrich ā€¢ Zipkin ā€¢ Iago ā€¢ Finatra
  • 3. Dominik Gruber ā€¢ @the_domTwitter Stack Introduction ā€¢ Twitter started to move oļ¬€ Ruby on Rails in 2010 ā€¢ Currently still on Scala 2.9
  • 4. Dominik Gruber ā€¢ @the_domTwitter Stack Prominent Adopters ā€¢ Box ā€¢ eBay ā€¢ Etsy ā€¢ Foursquare ā€¢ Gigya ā€¢ Nest ā€¢ Pinterest ā€¢ Rdio ā€¢ SoundCloud ā€¢ Tumblr
  • 5. Dominik Gruber ā€¢ @the_domTwitter Stack
  • 6. Dominik Gruber ā€¢ @the_domTwitter Stack Finagle ā€œFinagle is an extensible RPC system for the JVM, used to construct high-concurrency servers. Finagle implements uniform client and server APIs for several protocols, and is designed for high performance and concurrency. Most of Finagleā€™s code is protocol agnostic, simplifying the implementation of new protocols.ā€
  • 7. Dominik Gruber ā€¢ @the_domTwitter Stack Finagle providesā€¦ ā€¢ Connection pools ā€¢ Failure detection ā€¢ Failover strategies ā€¢ Load balancers ā€¢ Back-pressure techniques
  • 8. Dominik Gruber ā€¢ @the_domTwitter Stack Finagleā€¦ ā€¢ publishes standard statistics, logs, and exception reports ā€¢ supports distributed tracing across protocols ā€¢ optionally uses ZooKeeper for cluster management ā€¢ supports common sharding strategies
  • 9. Dominik Gruber ā€¢ @the_domTwitter Stack Modules (Examples) ā€¢ finagle-http ā€¢ finagle-memcached ā€¢ finagle-mysql ā€¢ finagle-protobuf ā€¢ finagle-redis ā€¢ finagle-thrift
  • 10. Dominik Gruber ā€¢ @the_domTwitter Stack Basic abstractions ā€¢ Future ā€¢ Service ā€¢ Filter
  • 11. Dominik Gruber ā€¢ @the_domTwitter Stack Ostrich
  • 12. Dominik Gruber ā€¢ @the_domTwitter Stack Ostrich ā€¢ A stats collector & reporter ā€¢ Collect runtime statistics (counters, gauges, metrics, and labels) ā€¢ Report those statistics through a simple web interface or into log ļ¬les ā€¢ Similar to Metricsā€Ø https://github.com/dropwizard/metrics
  • 13. Dominik Gruber ā€¢ @the_domTwitter Stack
  • 14. Dominik Gruber ā€¢ @the_domTwitter Stack Zipkin ā€œZipkin is a distributed tracing system that helps us gather timing data for all the disparate services at Twitter. It manages both the collection and lookup of this data through a Collector and a Query service.ā€
  • 15. Dominik Gruber ā€¢ @the_domTwitter Stack Zipkin
  • 16. Dominik Gruber ā€¢ @the_domTwitter Stack Zipkinā€™s Architecture
  • 17. Dominik Gruber ā€¢ @the_domTwitter Stack Zipkin ā€¢ ā€œScribeā€ to transport traces to Zipkin and Hadoop ā€¢ Data stored in either Cassandra, Redis, HBase, MySQL, PostgreSQL, SQLite, or H2
  • 18. Dominik Gruber ā€¢ @the_domTwitter Stack Iago
  • 19. Dominik Gruber ā€¢ @the_domTwitter Stack Iago ā€¢ A load generator that replays production or synthetic traļ¬ƒc ā€¢ Iago supports arbitrarily high rates of traļ¬ƒc via built- in support for creating cluster
  • 20. Dominik Gruber ā€¢ @the_domTwitter Stack Protocols ā€¢ HTTP ā€¢ Thrift ā€¢ Memcache ā€¢ Kestrel (A queueing system from Twitter) ā€¢ UDP
  • 21. Dominik Gruber ā€¢ @the_domTwitter Stack Finatra
  • 22. Dominik Gruber ā€¢ @the_domTwitter Stack
  • 23. Dominik Gruber ā€¢ @the_domTwitter Stack Features ā€¢ Fully Async using Futures ā€¢ Mustache Templates ā€¢ Detailed Metrics (p99,p999, etc) ā€¢ Proļ¬le/Debug over HTTP ā€¢ SSL/TLS Support ā€¢ Deploys with a single jar
  • 24. Dominik Gruber ā€¢ @the_domTwitter Stack Thereā€™s moreā€¦ ā€¢ ā€¢ Summingbird ā€¢ https://github.com/twitter
  • 25. Dominik Gruber ā€¢ @the_domTwitter Stack Q & A
  • 26. Dominik Gruber ā€¢ @the_domTwitter Stack Source ā€¢ http://blog.oskarsson.nu/post/40196324612/the- twitter-stackā€Ø https://blog.twitter.com/2011/ļ¬nagle-a-protocol- agnostic-rpc-system ā€¢ https://www.youtube.com/watch?v=whuT_-cFb5Iā€Ø https://www.youtube.com/watch?v=QdER-Zl_YCM ā€¢ https://github.com/twitterā€Ø https://github.com/ļ¬nagle