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

Introduction to Consul

Introduction to Consul

Introduction to Consul and service discovery

Roger Johansson

November 02, 2016
Tweet

More Decks by Roger Johansson

Other Decks in Programming

Transcript

  1. Consul Base features available (Consul, ETCD and Zookeeper) • Support

    for both REST API and DNS. • Distributed Configuration / Key Value storage • TLS Support
  2. Consul Primary features • Built for service discovery (ETCD and

    Zookeeper are pure key value stores) • Health checks (ETCD and Zookeeper only support time to live entries) • Context Aware services by tagging individual instances. • Commercial Support exists • A Complete Product Supports everything from service discovery, distributed configuration, DNS support out of the box, competitors need extra tools. • Scalable scales to many thousands of nodes, far more than what we need
  3. Consul Additional features • Easy to set up, works in

    dev environment. • Easy to use Web UI built in for development environments. • Fast, agents run on each server, sub millisecond lookups. • Access Control Lists, limit access to key value store • Multi Datacenter support, if we need. • Push events between nodes • Event Subscription (via long polling) status changes
  4. Scaling Microservices A microservice architecture puts each element of functionality

    into a separate service… …and scales by distributing these services across servers, replicating as needed -Martin Fowler, James Lewis
  5. Login • Triobet • MGA Login • Triobet • EE

    Login • Triobet • LV Login • Triobet • LV • VIP Context Aware Same service Different contexts Service Registry
  6. Login • Triobet • MGA Login • Triobet • EE

    Login • Triobet • LV Login • Triobet • LV • VIP Context Aware Service Registry Lookup Where is ”Login” for Triobet, LV, VIP
  7. Highly Available Cluster Agent Agent Agent Agent Agent Server Server

    Server All state is replicated to agents Server Cluster
  8. Highly Available Cluster Agent Agent Agent Agent Agent Server Server

    Server This agent still has data Server Cluster BAM
  9. Consul enables • High Availability via redundant service instances •

    Scalability by load balancing over multiple instances • Context Aware by tagging service instances • Distributed Configuration • Circuit Breaker by removing overloaded services from the service discovery