SlideShare a Scribd company logo
Service Discovery
In Distributed Systems
IVAN VOROSHILIN
@vibneiro
My Interests:
Ivan Voroshilin - Computer geek
Bio
Distributed systems
Architecture
Functional languages
Algorithms
Service Discovery?
Let’s recall
OMG! This is an unmanageable mess!
Google
Twitter
Netflix
Facebook
Why?
I don’t have to restart a service to update configuration
I don’t have to redeploy something, when a service is moved to another box
I don’t have to know whether a needed service is alive at the moment
Load-balancing might be taken care for you by Service Discovery also
Service Discovery takes a responsibility to store configs for you in 1 place
Agenda
- Main properties of Service Discovery
- Popular Open-Source Solutions
Differences, Trade-offs
- Bonus
Service Discovery
The main components
The main idea of Service Discovery in
simple terms
Announce/LookUp
Service Directory
Register Services
Discover Services
Consistent
Highly-available
a.k.a. Announce
a.k.a. LookUp
CAP?
ConsistencyAvailability
PartitionTolerance
2 out of 3 properties: Either CP or AP.
No other options
Issues when developing
Service Discovery
Fault Tolerance
Data Consistency
Distributed Locks
Leader Election
(Itisnottrivial!)
Review of Open Source Projects
Project Name Implementor Год рождения
Chubby Google 2006
ZooKeeper [*] Apache 2007
Doozerd Blake Mizerany 2010
My in-house solution Deutsche bank 2012
Eureka [*] Netflix 2012
ETCD [*] CoreOS 2013
SmartStack AirBnb 2013
Surf HashiCorp 2014
SkyDNS Erik St. Martin 2014
Consul [*] HashiCorp 2014
Name resolution and DNS
Announce/Lookup?! Sounds like DNS..
- Scales out badly
- Split-brain
- Too simple
Architectural trade-offs
Zookeeper
ETCD
Consul
Eureka
SmartStack
SkyDNS
Serf
Service Discovery
Open Source Solutions
2 Categories of solutions
- General purpose solutions:
ZooKeeper, ETCD
- Solely Service Discovery solutions:
Eureka, Surf, Consul
Apache Zookeeper
- Consensus protocol ZAB, CP
- Written in Java
- Language binding: Java and C API
- Key-value store based on ephemeral nodes
- Clients need to handle any load balancing or failover
themselves
- On any non-quorum side, reads and writes will return an
error.
Apache Zookeeper
In Hadoop, Mesos, Kafka, Netflix
Distributed lock for coordination
- Heavyweight
- Difficult to use
- Not ideal for Service Discovery
- Ephemeral nodes not reliable
Netflix Eureka
- Eventually consistent, AP
- Broadcast async replication among servers, no quorum
- HTTP-REST API
- Written in Java
- Java smart client with round robin balancer
- Caching of server entries on the client side
- add/remove nodes online
- TTL refreshment mechanism
- Used for AWS cloud
ETCD
- Inspired by Zookeeper
- Consensus protocol - RAFT, CP
- Written in Go
- HTTP REST API
- Key-value: Store data in directories
- TTLs for keys expiration
- Clients need to handle any load balancing or failover
themselves
- Watch a key or directory for changes and react to the
new values
Consul
- Consensus protocol RAFT: CP
- HTTP REST API or even DNS interface
- Built-in DNS server as a service registry
- Security: TLS, ACLs
- Comprehensive solution for Service Discovery
- Specialized health-checks, besides just heartbeats
- Optional read consistency mode: stale
(when leader is unavailable)
What should do a comprehensive
Service Discovery?
Nothing from the mentioned answers the following question:
How to without a hassle to integrate your existing landscape with a service
discovery solution?
Doesn’t matter whether 3-party or in-house applications
What about closed 3-rd party systems?
Language binding?
Need to write client code to adapt?
Service Discovery in Docker environment
Meet - “Side-kick” processes.
(Introduced in SmartStack and Serf Solutions)
Client application
Backend 1 Backend 2
application
HAProxy
ETCD-cluster
service process
side-kick
service process
side-kick
discover
HTTP/TCP proxied HTTP/TCP proxied
announce announce
watchhealth check
TTL TTL
check health
Summary
No One size fits all solutions
The right architecture or Open-Source solution directly
depends on clear requirements
Thanks for attention
blog: www.ivoroshilin.com
Q & A

More Related Content

PPTX
Service Discovery Like a Pro
PDF
Service discovery with Eureka and Spring Cloud
PDF
Service discovery in mesos miguel, Angel Guillen
PDF
Consul and Consul Pusher
PDF
Consul: Microservice Enabling Microservices and Reactive Programming
PDF
Operating Consul as an Early Adopter
PDF
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
PDF
API Gateway report
Service Discovery Like a Pro
Service discovery with Eureka and Spring Cloud
Service discovery in mesos miguel, Angel Guillen
Consul and Consul Pusher
Consul: Microservice Enabling Microservices and Reactive Programming
Operating Consul as an Early Adopter
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
API Gateway report

What's hot (20)

PPTX
Service Discovery with Consul
PDF
Spring Cloud: Why? How? What?
PDF
Introduction to Kong API Gateway
PDF
Common issues with Apache Kafka® Producer
PDF
Kafka Summit SF 2017 - Kafka Connect Best Practices – Advice from the Field
PPTX
Livy: A REST Web Service for Spark
PPTX
Monitoring Apache Kafka
PDF
Netflix conductor
PPTX
2019 hashiconf seattle_consul_ioc
PDF
Integrating Apache Kafka Into Your Environment
PDF
URP? Excuse You! The Three Metrics You Have to Know
PDF
Microservices with Spring Cloud and Netflix OSS
PDF
Introducing Confluent labs Parallel Consumer client | Anthony Stubbes, Confluent
PDF
Микросервисы со Spring Boot & Spring Cloud
PDF
Metrics Are Not Enough: Monitoring Apache Kafka and Streaming Applications
PDF
Manage your APIs and Microservices with an API Gateway
PDF
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
PPTX
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
PDF
Data Microservices with Spring Cloud
PDF
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Service Discovery with Consul
Spring Cloud: Why? How? What?
Introduction to Kong API Gateway
Common issues with Apache Kafka® Producer
Kafka Summit SF 2017 - Kafka Connect Best Practices – Advice from the Field
Livy: A REST Web Service for Spark
Monitoring Apache Kafka
Netflix conductor
2019 hashiconf seattle_consul_ioc
Integrating Apache Kafka Into Your Environment
URP? Excuse You! The Three Metrics You Have to Know
Microservices with Spring Cloud and Netflix OSS
Introducing Confluent labs Parallel Consumer client | Anthony Stubbes, Confluent
Микросервисы со Spring Boot & Spring Cloud
Metrics Are Not Enough: Monitoring Apache Kafka and Streaming Applications
Manage your APIs and Microservices with an API Gateway
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
Data Microservices with Spring Cloud
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Ad

Viewers also liked (20)

PDF
Web Services Discovery and Recommendation Based on Information Extraction and...
PPTX
Service Discovery using etcd, Consul and Kubernetes
PDF
Service discovery in a microservice architecture using consul
PDF
Building a smarter application stack - service discovery and wiring for Docker
PPTX
Zuzana Valachová: Discovery services in Library and Information institutions ...
PDF
Implementing web scale discovery services: special reference to Indian Librar...
PPTX
Web scale discovery vs google scholar
PPTX
Moving forward under the weight of all that state
PDF
Service discovery in mesos
PDF
Cumulonimbus fortification-secure-your-data-in-the-cloud
PDF
Evaluation of Web Scale Discovery Services
PPTX
Web Scale Discovery Vs Federated Search
PPT
Directory and discovery services
PPTX
Enterprise API Adoption Patterns
PDF
PuppetConf 2016: Service Discovery and Puppet – Marc Cluet, Ukon Cherry
PPTX
Scaling Like Twitter with Apache Mesos
PPTX
Service Discovery and Registration in a Microservices Architecture
PDF
Workshop WSO2 BPS 3.5.x - BPMN
PDF
Docker In the Bank
PDF
WILD microSERVICES v2
Web Services Discovery and Recommendation Based on Information Extraction and...
Service Discovery using etcd, Consul and Kubernetes
Service discovery in a microservice architecture using consul
Building a smarter application stack - service discovery and wiring for Docker
Zuzana Valachová: Discovery services in Library and Information institutions ...
Implementing web scale discovery services: special reference to Indian Librar...
Web scale discovery vs google scholar
Moving forward under the weight of all that state
Service discovery in mesos
Cumulonimbus fortification-secure-your-data-in-the-cloud
Evaluation of Web Scale Discovery Services
Web Scale Discovery Vs Federated Search
Directory and discovery services
Enterprise API Adoption Patterns
PuppetConf 2016: Service Discovery and Puppet – Marc Cluet, Ukon Cherry
Scaling Like Twitter with Apache Mesos
Service Discovery and Registration in a Microservices Architecture
Workshop WSO2 BPS 3.5.x - BPMN
Docker In the Bank
WILD microSERVICES v2
Ad

Similar to Service Discovery in Distributed Systems (20)

PDF
Service Discovery in MicroServices
PDF
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
PPTX
03 spring cloud eureka service discovery
PDF
Service Discovery. Spring Cloud Internals
PDF
Service Discovery 101
PDF
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
PDF
Managing microservices with istio on OpenShift - Meetup
PPTX
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
PPTX
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
PDF
Docker discovery service
PDF
Gasimov Orkhan "Service Discovery and Coordination by Netflix Eureka and Spri...
PDF
Spring cloud Service-Discovery
PPTX
Microservices with Spring
PDF
Modelling Microservices at Spotify - Petter Mahlen
PDF
What they don't tell you about micro-services
PDF
Service Discovery or Why each micro service should believe it's the only one ...
PDF
Beyond static configuration
PDF
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
PDF
Service discovery using crd ts fun-conf
PDF
Microservices reativos usando a stack do Netflix na AWS
Service Discovery in MicroServices
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
03 spring cloud eureka service discovery
Service Discovery. Spring Cloud Internals
Service Discovery 101
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
Managing microservices with istio on OpenShift - Meetup
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Docker discovery service
Gasimov Orkhan "Service Discovery and Coordination by Netflix Eureka and Spri...
Spring cloud Service-Discovery
Microservices with Spring
Modelling Microservices at Spotify - Petter Mahlen
What they don't tell you about micro-services
Service Discovery or Why each micro service should believe it's the only one ...
Beyond static configuration
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
Service discovery using crd ts fun-conf
Microservices reativos usando a stack do Netflix na AWS

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Transform Your Business with a Software ERP System
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
PTS Company Brochure 2025 (1).pdf.......
PPT
Introduction Database Management System for Course Database
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
assetexplorer- product-overview - presentation
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
System and Network Administraation Chapter 3
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Digital Systems & Binary Numbers (comprehensive )
Computer Software and OS of computer science of grade 11.pptx
Transform Your Business with a Software ERP System
Introduction to Artificial Intelligence
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PTS Company Brochure 2025 (1).pdf.......
Introduction Database Management System for Course Database
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
VVF-Customer-Presentation2025-Ver1.9.pptx
assetexplorer- product-overview - presentation
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
wealthsignaloriginal-com-DS-text-... (1).pdf
System and Network Administraation Chapter 3
Navsoft: AI-Powered Business Solutions & Custom Software Development
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
history of c programming in notes for students .pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Designing Intelligence for the Shop Floor.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)

Service Discovery in Distributed Systems

  • 1. Service Discovery In Distributed Systems IVAN VOROSHILIN @vibneiro
  • 2. My Interests: Ivan Voroshilin - Computer geek Bio Distributed systems Architecture Functional languages Algorithms
  • 4. OMG! This is an unmanageable mess! Google Twitter Netflix Facebook
  • 5. Why? I don’t have to restart a service to update configuration I don’t have to redeploy something, when a service is moved to another box I don’t have to know whether a needed service is alive at the moment Load-balancing might be taken care for you by Service Discovery also Service Discovery takes a responsibility to store configs for you in 1 place
  • 6. Agenda - Main properties of Service Discovery - Popular Open-Source Solutions Differences, Trade-offs - Bonus
  • 8. The main idea of Service Discovery in simple terms Announce/LookUp Service Directory Register Services Discover Services Consistent Highly-available a.k.a. Announce a.k.a. LookUp
  • 9. CAP? ConsistencyAvailability PartitionTolerance 2 out of 3 properties: Either CP or AP. No other options
  • 10. Issues when developing Service Discovery Fault Tolerance Data Consistency Distributed Locks Leader Election (Itisnottrivial!)
  • 11. Review of Open Source Projects Project Name Implementor Год рождения Chubby Google 2006 ZooKeeper [*] Apache 2007 Doozerd Blake Mizerany 2010 My in-house solution Deutsche bank 2012 Eureka [*] Netflix 2012 ETCD [*] CoreOS 2013 SmartStack AirBnb 2013 Surf HashiCorp 2014 SkyDNS Erik St. Martin 2014 Consul [*] HashiCorp 2014
  • 12. Name resolution and DNS Announce/Lookup?! Sounds like DNS.. - Scales out badly - Split-brain - Too simple
  • 15. 2 Categories of solutions - General purpose solutions: ZooKeeper, ETCD - Solely Service Discovery solutions: Eureka, Surf, Consul
  • 16. Apache Zookeeper - Consensus protocol ZAB, CP - Written in Java - Language binding: Java and C API - Key-value store based on ephemeral nodes - Clients need to handle any load balancing or failover themselves - On any non-quorum side, reads and writes will return an error.
  • 17. Apache Zookeeper In Hadoop, Mesos, Kafka, Netflix Distributed lock for coordination - Heavyweight - Difficult to use - Not ideal for Service Discovery - Ephemeral nodes not reliable
  • 18. Netflix Eureka - Eventually consistent, AP - Broadcast async replication among servers, no quorum - HTTP-REST API - Written in Java - Java smart client with round robin balancer - Caching of server entries on the client side - add/remove nodes online - TTL refreshment mechanism - Used for AWS cloud
  • 19. ETCD - Inspired by Zookeeper - Consensus protocol - RAFT, CP - Written in Go - HTTP REST API - Key-value: Store data in directories - TTLs for keys expiration - Clients need to handle any load balancing or failover themselves - Watch a key or directory for changes and react to the new values
  • 20. Consul - Consensus protocol RAFT: CP - HTTP REST API or even DNS interface - Built-in DNS server as a service registry - Security: TLS, ACLs - Comprehensive solution for Service Discovery - Specialized health-checks, besides just heartbeats - Optional read consistency mode: stale (when leader is unavailable)
  • 21. What should do a comprehensive Service Discovery? Nothing from the mentioned answers the following question: How to without a hassle to integrate your existing landscape with a service discovery solution? Doesn’t matter whether 3-party or in-house applications What about closed 3-rd party systems? Language binding? Need to write client code to adapt?
  • 22. Service Discovery in Docker environment Meet - “Side-kick” processes. (Introduced in SmartStack and Serf Solutions) Client application Backend 1 Backend 2 application HAProxy ETCD-cluster service process side-kick service process side-kick discover HTTP/TCP proxied HTTP/TCP proxied announce announce watchhealth check TTL TTL check health
  • 23. Summary No One size fits all solutions The right architecture or Open-Source solution directly depends on clear requirements
  • 24. Thanks for attention blog: www.ivoroshilin.com Q & A