consul

8
Playing With Consul

Upload: ariel-moskovich

Post on 21-Jan-2017

456 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Consul

Playing With Consul

Page 2: Consul

Today's Menu

● What is Consul?● How Consul works?● HTTP Endpoints● More Consul features● Examples from AppsFlyer production● Let's Play...

Page 3: Consul

What is Consul?

Service Discovery

Failure Detection

K/V Storage

Multi DC Support

Page 4: Consul

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

Page 5: Consul

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

Page 6: Consul

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

Page 7: Consul

Production Examples

Page 8: Consul

Let's Play