consul
TRANSCRIPT
Playing With Consul
Today's Menu
● What is Consul?● How Consul works?● HTTP Endpoints● More Consul features● Examples from AppsFlyer production● Let's Play...
What is Consul?
Service Discovery
Failure Detection
K/V Storage
Multi DC Support
Agent
Agent Agent
Gossip
Clients
Agent Agent
Agent
Raft
ServersRPC
Gossip
● Both Clients and servers are Agents
● Server participate in Raft quorum, answer RPC queries, exchange WAN gossip and forward queries to leader or remote DC
● Client forward RPCs to server, propagate data via LAN gossip
How Consul Works
HTTP Endpoints
● Agent: registration and de-registration of checks, members, etc
● Catalog: register and de-register nodes, services, and checks
● Sessions: enable distributed locks● Health Checks: enable health related queries● Acl: Manage acl tokens● Events: fire new events ● Status: Status of the consul cluster
Additional features
● Watchers: View of data which is monitored for updates
● Templates: Populate values from Consul into the filesystem
● DNS Interface: Enable service discovery without any integration
● RPC : Control agent programmatically
Production Examples
Let's Play