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

Introduction to Consul

Introduction to Consul

In this talk we briefly introduce Consul and how it solves core problems for a Service Oriented Architecture (SOA) of service discovery, load balancing, health checking and configuration.

Armon Dadgar

April 23, 2014
Tweet

More Decks by Armon Dadgar

Other Decks in Programming

Transcript

  1. SOA Primer • Service Oriented Architecture • Autonomous • Limited

    Scope • Loose Coupling • e.g. opposite of classic monolith
  2. Web App Order Processing Node 1 Node N … Load

    Balancing How to ensure request leveling across providers?
  3. Web App Order Processing Node 1 Node N … Load

    Balancer Anti-Pattern! Load Balancer is a Single Point of Failure (SPOF)
  4. Web App Order Processing Node 1 Node N … Health

    Checking How to avoid routing to unhealthy hosts?
  5. Web App Web App Web App Maintenance = true EnableFeature

    = false Configuration How to efficiently push dynamic configuration?
  6. Solutions* • ZooKeeper, etcd, doozerd • Nagios, Sensu • SkyDNS

    • SmartStack Consul Comparisons: http://www.consul.io/intro/vs/index.html
  7. First Pass: Serf • Node membership • Failure Detection •

    Custom Events • Tag Meta Data • http://serfdom.io
  8. Serf Shortcomings • 1 Node : 1 Service • 1

    : N possible with tag overloading • Liveness check only • Fully decentralized • Joy to operate • Difficult to extend • Eventually Consistent Only
  9. Learning • 1 Node : N Services • Host checks

    + Service Checks • Simpler interfaces (Serf only MsgPack/TCP) • Strong Consistency • Multi Datacenter (Serf WAN not optimal)
  10. Service Discovery HTTP + DNS Datacenter Aware (Ritualistic sacrifice not

    required) K/V Store HTTP API Host & Service Level Health Checks
  11. Consul Today • Powers Vagrant Cloud • Used in our

    on-premise product • Version 0.1 Released • Version 0.2 Next Week • Web UI