health checks • Real-time updates • Installed it over a weekend and started integrating to our demo • 4x faster deploy time • Parallel deployment of all VMs • Chef runs no longer had issues with dependencies • Health checks / Consul template (haproxy demo) • A++++ Would recommend • Started integrating it everywhere
• Consul DNS on all servers on the platform: • monitoring-rabbitmq.service.consul:4567 • servicewatch: service sensu-client restart • graphite.service.consul:2003 • Result: • Rebuild the monitoring stack 10-20x a day to rapidly iterate • All clients automatically reconnect, no noticeable impact
instances • Nginx • Consul-template for upstream • Consul kv for specific API settings • Microservices • One service might talk to many (aggregators) • Local HAproxy + consul template • Consul has become the source of truth Nginx/Varnish Fastly API Consul Cassandra
up/down • database connections • disk • Be careful - you could DDoS yourself with consul • Consistency • Same ports, config locations, etc • Our APIs should be like “legos”
DNS name • We can alter the underlying nodes • No more chef search or static code • Cassandra seed discovery • Ask consul KV if the cluster exists • If not, you are the seed • Be careful with heavy health checks • nodetool status can take a long time
cassandra-env.sh • cassandra.yaml • KV path from user data • Allows a generic image to be very flexible • Speeds build time • Reduces errors • ~100 node cluster
server has consul key watch • Consul clients post a CSR to a particular kv path • Server responds with a signed cert in a different kv path • Scriptable certificate signing • Valid certificates signed by internal PKI, security approved
Internal • caused 500mb/s+ network traffic • disabled consul agent • Cloud • Lots of flapping services due to raft protocol and network routing • Result: Make all private addresses routable to all others
image - immutable / autoscalable deployment • Envconsul => set environment variables at runtime and drive all config • Push Consul KV to clusters automatically through jenkins and github • Vault integration - trustme api • trustme provides a consul token with the proper ACL based on tags / environment variables • Cloud and environment agnostic