SlideShare une entreprise Scribd logo
1  sur  12
service discovery with 
Consul 
Saul Caganoff @scaganoff
Service Discovery 
 How do we know where services are running? 
 How can consumers bind to services? 
 Hosts 
 Ports 
What about using meta-data for service discovery?
Microservices 
 Service Discovery is particularly important 
 Large number of services 
 Service coordination based on availability 
 Active/active 
 Active/passive 
 Partitioning into read/write instances 
 Service versioning 
 Topology changes based on availability and deployment 
 Ephemeral infrastructure 
 EC2, PaaS, Docker etc…
Familiar Examples 
 DNS – internet scale service discovery 
 But not dynamic enough 
 Unix /etc/services 
 SOA with service catalogue/repository 
 Not usually runtime 
 Strong consistency requirements as found in distributed file 
systems and lock servers – e.g. leader election
Lock-Servers: Chubby 
 Google Chubby – Mike Burrows, 2006 
 Distributed lock server 
 “Allow clients to synchronize their activities & agree on basic 
information about their environment” 
 Leader election 
 Allow leader to discover its servers 
 Allow clients to discover the leader 
 Meta-data storage – well-known & available location 
 Never released outside Google 
http://static.googleusercontent.com/media/research.google.com/en//ar 
chive/chubby-osdi06.pdf
Lock-Servers: Apache Zookeeper 
 Developed by Yahoo! & donated to Apache Foundation. 
 The de facto lock server in use today 
 Uses the Paxos algorithm 
 Guarantees strict ordering of events 
 …but difficult to setup and use. 
Leslie Lamport, inventor 
of the Paxos Algorithm & 
Turing Award Winner 2013
The New Kids… 
 Doozerd – “consistent distributed data store” 
 inactive 
 etcd – “a highly-available key value store for shared 
configuration and service discovery” 
 Sponsored by CoreOS – very active 
 Consul – “a tool for service discovery, monitoring and 
configuration” 
 Sponsored by Hashicorp – very active 
 All based on the Raft protocol for distributed consensus.
What’s Different about Consul? 
 More than a data store… 
 Has opinionated features and abstractions for 
 Service discovery 
 Monitoring 
 Consul agents run as a server or a client: 
 servers participate in the Raft quorum to 
maintain cluster state 
 Clients proxy requests to servers 
 support more sophisticated health checks 
 Is datacentre aware 
 Provides HTTP and DNS interfaces
Health Checks 
 Script + Interval 
 Runs a script on a given interval 
 Exit status: 0=healthy, 1=warning, other=failed 
 TTL – like a dead-man switch 
 Application reports its status periodically 
 No report -> failed status
HTTP API
Demo
Consul & Docker 
 progrium/consul 
 Preconfigured consul agent designed to run in docker 
 progrium/registrator 
 Uses docker events & config to automatically register docker 
containers into Consul (& etcd & SkyDNS)

Contenu connexe

En vedette

PostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consulPostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consulSean Chittenden
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Pivorak MeetUp
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Docker, Inc.
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and othersWalter Liu
 
Automatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confdAutomatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confd충섭 김
 
Docker consul-registrator
Docker consul-registratorDocker consul-registrator
Docker consul-registratorlaonap166
 
Service discovery and puppet
Service discovery and puppetService discovery and puppet
Service discovery and puppetMarc Cluet
 
Docker in production service discovery with consul - road to opscon 2015
Docker in production  service discovery with consul - road to opscon 2015Docker in production  service discovery with consul - road to opscon 2015
Docker in production service discovery with consul - road to opscon 2015Giovanni Toraldo
 
Funtional Web Service Composition
Funtional Web Service CompositionFuntional Web Service Composition
Funtional Web Service CompositionRohit Kumar Gupta
 
Service Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitectureService Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitecturePLUMgrid
 
Consul は 全自動オーケストレーションの 夢を見るか?
Consul は 全自動オーケストレーションの 夢を見るか?Consul は 全自動オーケストレーションの 夢を見るか?
Consul は 全自動オーケストレーションの 夢を見るか?Uchio Kondo
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discoverym_richardson
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateJulien Maitrehenry
 
Serf / Consul 入門 ~仕事を楽しくしよう~
Serf / Consul 入門 ~仕事を楽しくしよう~Serf / Consul 入門 ~仕事を楽しくしよう~
Serf / Consul 入門 ~仕事を楽しくしよう~Masahito Zembutsu
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First StepsMarc Cluet
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionVincent Composieux
 
Prometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksPrometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksSatoshi Suzuki
 

En vedette (20)

PostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consulPostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consul
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and others
 
Automatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confdAutomatic docker service announcement with registrator and confd
Automatic docker service announcement with registrator and confd
 
Docker consul-registrator
Docker consul-registratorDocker consul-registrator
Docker consul-registrator
 
Service discovery in mesos
Service discovery in mesosService discovery in mesos
Service discovery in mesos
 
Ocaml
OcamlOcaml
Ocaml
 
Service discovery and puppet
Service discovery and puppetService discovery and puppet
Service discovery and puppet
 
Docker in production service discovery with consul - road to opscon 2015
Docker in production  service discovery with consul - road to opscon 2015Docker in production  service discovery with consul - road to opscon 2015
Docker in production service discovery with consul - road to opscon 2015
 
Funtional Web Service Composition
Funtional Web Service CompositionFuntional Web Service Composition
Funtional Web Service Composition
 
Service Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitectureService Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices Architecture
 
Consul は 全自動オーケストレーションの 夢を見るか?
Consul は 全自動オーケストレーションの 夢を見るか?Consul は 全自動オーケストレーションの 夢を見るか?
Consul は 全自動オーケストレーションの 夢を見るか?
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-template
 
Kong
KongKong
Kong
 
Serf / Consul 入門 ~仕事を楽しくしよう~
Serf / Consul 入門 ~仕事を楽しくしよう~Serf / Consul 入門 ~仕事を楽しくしよう~
Serf / Consul 入門 ~仕事を楽しくしよう~
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First Steps
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
 
Prometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksPrometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual Talks
 

Plus de Saul Caganoff

Growing an API Culture - APIdays LIVE AU 2020
Growing an API Culture - APIdays LIVE AU 2020Growing an API Culture - APIdays LIVE AU 2020
Growing an API Culture - APIdays LIVE AU 2020Saul Caganoff
 
Events in a microservices architecture
Events in a microservices architectureEvents in a microservices architecture
Events in a microservices architectureSaul Caganoff
 
Microservices: The View from the Peak of Expectations
Microservices: The View from the Peak of ExpectationsMicroservices: The View from the Peak of Expectations
Microservices: The View from the Peak of ExpectationsSaul Caganoff
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless ArchitectureSaul Caganoff
 
Automating Business Processes with APIs
Automating Business Processes with APIsAutomating Business Processes with APIs
Automating Business Processes with APIsSaul Caganoff
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservicesSaul Caganoff
 
Docker in the Enterprise
Docker in the EnterpriseDocker in the Enterprise
Docker in the EnterpriseSaul Caganoff
 
Delivering the Composable Enterprise
Delivering the Composable EnterpriseDelivering the Composable Enterprise
Delivering the Composable EnterpriseSaul Caganoff
 
Melbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureMelbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureSaul Caganoff
 

Plus de Saul Caganoff (9)

Growing an API Culture - APIdays LIVE AU 2020
Growing an API Culture - APIdays LIVE AU 2020Growing an API Culture - APIdays LIVE AU 2020
Growing an API Culture - APIdays LIVE AU 2020
 
Events in a microservices architecture
Events in a microservices architectureEvents in a microservices architecture
Events in a microservices architecture
 
Microservices: The View from the Peak of Expectations
Microservices: The View from the Peak of ExpectationsMicroservices: The View from the Peak of Expectations
Microservices: The View from the Peak of Expectations
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Automating Business Processes with APIs
Automating Business Processes with APIsAutomating Business Processes with APIs
Automating Business Processes with APIs
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservices
 
Docker in the Enterprise
Docker in the EnterpriseDocker in the Enterprise
Docker in the Enterprise
 
Delivering the Composable Enterprise
Delivering the Composable EnterpriseDelivering the Composable Enterprise
Delivering the Composable Enterprise
 
Melbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureMelbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new Architecture
 

Dernier

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 DevelopmentsTrustArc
 
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 BusinessPixlogix Infotech
 
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 productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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...Neo4j
 
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...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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.pdfsudhanshuwaghmare1
 
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.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 2024Rafal Los
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 

Service Discovery with Consul

  • 1. service discovery with Consul Saul Caganoff @scaganoff
  • 2. Service Discovery  How do we know where services are running?  How can consumers bind to services?  Hosts  Ports What about using meta-data for service discovery?
  • 3. Microservices  Service Discovery is particularly important  Large number of services  Service coordination based on availability  Active/active  Active/passive  Partitioning into read/write instances  Service versioning  Topology changes based on availability and deployment  Ephemeral infrastructure  EC2, PaaS, Docker etc…
  • 4. Familiar Examples  DNS – internet scale service discovery  But not dynamic enough  Unix /etc/services  SOA with service catalogue/repository  Not usually runtime  Strong consistency requirements as found in distributed file systems and lock servers – e.g. leader election
  • 5. Lock-Servers: Chubby  Google Chubby – Mike Burrows, 2006  Distributed lock server  “Allow clients to synchronize their activities & agree on basic information about their environment”  Leader election  Allow leader to discover its servers  Allow clients to discover the leader  Meta-data storage – well-known & available location  Never released outside Google http://static.googleusercontent.com/media/research.google.com/en//ar chive/chubby-osdi06.pdf
  • 6. Lock-Servers: Apache Zookeeper  Developed by Yahoo! & donated to Apache Foundation.  The de facto lock server in use today  Uses the Paxos algorithm  Guarantees strict ordering of events  …but difficult to setup and use. Leslie Lamport, inventor of the Paxos Algorithm & Turing Award Winner 2013
  • 7. The New Kids…  Doozerd – “consistent distributed data store”  inactive  etcd – “a highly-available key value store for shared configuration and service discovery”  Sponsored by CoreOS – very active  Consul – “a tool for service discovery, monitoring and configuration”  Sponsored by Hashicorp – very active  All based on the Raft protocol for distributed consensus.
  • 8. What’s Different about Consul?  More than a data store…  Has opinionated features and abstractions for  Service discovery  Monitoring  Consul agents run as a server or a client:  servers participate in the Raft quorum to maintain cluster state  Clients proxy requests to servers  support more sophisticated health checks  Is datacentre aware  Provides HTTP and DNS interfaces
  • 9. Health Checks  Script + Interval  Runs a script on a given interval  Exit status: 0=healthy, 1=warning, other=failed  TTL – like a dead-man switch  Application reports its status periodically  No report -> failed status
  • 11. Demo
  • 12. Consul & Docker  progrium/consul  Preconfigured consul agent designed to run in docker  progrium/registrator  Uses docker events & config to automatically register docker containers into Consul (& etcd & SkyDNS)