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.

11ba9630c9136eef9a70d26473d355d5?s=128

Armon Dadgar

April 23, 2014
Tweet

Transcript

  1. Introduction to Consul

  2. I’m Armon Dadgar @armon

  3. HashiCorp A DevOps tools company

  4. None
  5. SOA Primer • Service Oriented Architecture • Autonomous • Limited

    Scope • Loose Coupling • e.g. opposite of classic monolith
  6. Web App Forecasting Order Processing Order History

  7. Web App Order Processing Discovery Which nodes are part of

    “Order Processing”?
  8. Web App Order Processing Node 1 Node N … Load

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

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

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

    = false Configuration How to efficiently push dynamic configuration?
  12. Recap • Service Discovery • Load Balancing • Health Checking

    • Configuration
  13. Problems? Check.

  14. Solutions? Nope.

  15. Solutions* • ZooKeeper, etcd, doozerd • Nagios, Sensu • SkyDNS

    • SmartStack Consul Comparisons: http://www.consul.io/intro/vs/index.html
  16. Build it yourself!

  17. First Pass: Serf • Node membership • Failure Detection •

    Custom Events • Tag Meta Data • http://serfdom.io
  18. 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
  19. Learning • 1 Node : N Services • Host checks

    + Service Checks • Simpler interfaces (Serf only MsgPack/TCP) • Strong Consistency • Multi Datacenter (Serf WAN not optimal)
  20. Consul

  21. Service Discovery HTTP + DNS Datacenter Aware (Ritualistic sacrifice not

    required) K/V Store HTTP API Host & Service Level Health Checks
  22. It Just Works.

  23. None
  24. Consul Today • Powers Vagrant Cloud • Used in our

    on-premise product • Version 0.1 Released • Version 0.2 Next Week • Web UI
  25. Consul Tomorrow • Partner Deploys • Version 0.3+ • Leader

    Election • Clients • CLI tools
  26. Thanks! http://consul.io