Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Erstellung hochverfügbarer Dienste mit Consul

fraosug
January 17, 2017

Erstellung hochverfügbarer Dienste mit Consul

Consul ist ein verteiltes Service Discovery Tool. Das in Go geschriebene Programm ist für viele Plattformen verfügbar, unter anderem für Solaris 11 bzw. Illumos. In diesem Vortrag will ich aufzeigen, wie Consul bei der Erstellung von hochverfügbaren Diensten verwendet werden kann. Das Ziel ist es Gateways, Loadbalancer und auch Datenbanken hochverfügbar zu halten.

fraosug

January 17, 2017
Tweet

More Decks by fraosug

Other Decks in Technology

Transcript

  1. Stefan Husch @qutic ‣ Inhaber ‚qutic development‘ ‣ Beratung, Entwicklung

    und Hosting von Webapplikationen ‣ Rechenzentrums-Dienstleistungen
  2. 1. Consul client check health of service by executing check_lb

    script 1. check if loadbalancer is online 2. store ip addresses of all virtual interfaces as key-value in Consul 2. If check succceeds marks as healthy, if not mark as unhealthy, communicate result with Consul leader 3. If service is unhealthy, Consul will execute watch-script check_lb on the fallback loadbalancer 1. Get virtual interfaces and their ip out of consul key-value store 2. Create virtual interfaces with their ip 3. Update arp-table by sending out a gratuitous arp for all 4. Add route 5. Start failover loadbalancer service
  3. 1. Consul client check health of service by executing check_mysql

    script 1. check if mysql is online 2. If check succceeds marks as healthy, if not mark as unhealthy, communicate result with Consul leader 3. If service is unhealthy, Consul will execute watch-script check_mysql on all mysql-proxy instances 1. Rewrite mysql-proxy configuration (or use consul-template !) 2. Restart mysql-proxy Service
  4. ?

  5. Quellen ‣ https://www.consul.io ‣ https://github.com/hashicorp/consul ‣ https://www.youtube.com/watch?v=rA4hyJ-pccU ‣ http://www.thekelleys.org.uk/dnsmasq/doc.html ‣

    https://unbound.net ‣ https://www.consul.io/docs/internals/consensus.html ‣ https://www.consul.io/docs/guides/leader-election.html ‣ https://stripe.com/blog/service-discovery-at-stripe ‣ https://github.com/eBay/fabio ‣ https://github.com/hashicorp/consul-template ‣ https://github.com/darkcrux/consul-skipper