![Page 1: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/1.jpg)
Consul: Discover your Services
Oliver Fischer @sweblogtweets
Jörg Müller@JoergM
![Page 2: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/2.jpg)
Jörg Müller@JoergM
Hypoport AG
Oliver Fischer@sweblogtweets E-Post Development GmbH
![Page 3: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/3.jpg)
Why are we talking about Consul?
![Page 4: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/4.jpg)
Distributed Systems are the new normality
![Page 5: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/5.jpg)
Problem Areas
Service Discovery
Monitoring
Orchestration
Configuration
![Page 6: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/6.jpg)
What exactly is Service Discovery?
![Page 7: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/7.jpg)
Static Configuration
![Page 8: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/8.jpg)
Semantic DNS
![Page 9: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/9.jpg)
DNS and Loadbalancer
![Page 10: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/10.jpg)
Discovery via Registry
Service Registry
register
![Page 11: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/11.jpg)
Using Consul for Service Discovery
![Page 12: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/12.jpg)
How does this work?
![Page 13: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/13.jpg)
Local agents everywhere
![Page 14: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/14.jpg)
Server are cluster state aware
![Page 15: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/15.jpg)
Jim?
Jim is dead!
Jim is
dea
d!
Jim is
dea
d!
Jim is
dea
d!
Communication between cluster nodes
![Page 16: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/16.jpg)
Interaction of agents
![Page 17: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/17.jpg)
Complex example
![Page 18: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/18.jpg)
Real World Use Case
![Page 19: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/19.jpg)
DNS?
![Page 20: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/20.jpg)
DNS? -> No
![Page 21: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/21.jpg)
REST-API?
![Page 22: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/22.jpg)
REST-API? -> No
![Page 23: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/23.jpg)
Consul & HAProxy
![Page 24: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/24.jpg)
Show case
![Page 25: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/25.jpg)
DEMO
![Page 26: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/26.jpg)
But there is more…
![Page 27: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/27.jpg)
Features of Consul
![Page 28: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/28.jpg)
Consul
Service registry
![Page 29: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/29.jpg)
Consul
Service registry
DNS Server
Example on Github
![Page 30: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/30.jpg)
Consul
Service registry
DNS Server
Example on Github
HTTP API
![Page 31: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/31.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
![Page 32: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/32.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Example on Github
![Page 33: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/33.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
![Page 34: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/34.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
Watches & Events
Example on Github
![Page 35: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/35.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
Watches & Events
Example on Github
Checks
![Page 36: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/36.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
Watches & Events
Checks
Encryption and ACLs
![Page 37: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/37.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
Watches & Events
Checks
Encryption and ACLs
Multiple Datacenters
![Page 38: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/38.jpg)
Consul
Service registry
DNS Server
HTTP APIKey Value Store
Locks
Remote Execution
Watches & Events
Checks
Third party integrations
Encryption and ACLs
Multiple Datacenters
![Page 39: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/39.jpg)
Summary
![Page 40: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/40.jpg)
State of Consul
![Page 41: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/41.jpg)
Difficulties today
![Page 42: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/42.jpg)
The potential rises while using it
![Page 43: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/43.jpg)
More on ConsulGetting started:
https://consul.io/intro/index.html
Documentation: https://consul.io/docs/index.html
Our examples: https://github.com/JoergM/consul-examples
![Page 44: Consul: Discover your Services - GOTO Conferencegotocon.com/...2015/...ConsulDiscoverYourServices.pdf · Consul Service registry DNS Server HTTP API Key Value Store Locks Remote Execution](https://reader036.vdocuments.mx/reader036/viewer/2022070917/5fb7b8ef87cdcf3b03024c8e/html5/thumbnails/44.jpg)
Q & A