19
SERF@DEVOPS PUNE RAHUL KHENGARE

Serf@devops pune

Embed Size (px)

Citation preview

SERF@DEVOPS PUNERAHUL KHENGARE

Agenda What is Serf

Installation

Get Used To

Use Cases

Demo

Limitations

Target Audience

Having some knowledge of cluster environment

Managed Clusters environment

Eager to Learn SERF

SERF (By Hashicorp) OPEN SOURCE

Decentralized

Fault-tolerant

Highly Available

Uses Gossip Protocol to communicate with nodes

Extremely Light Weight (5-10 MB Memory Footprint)

Available for Linux, Mac OS X, and Windows

SERF USED FOR

Cluster Membership Management

Failure Detection and Recovery

Event Propagation

Orchestration

Installation Download SERF from https://www.serfdom.io/downloads.html Unzip and put binary in /usr/local/bin or /usr/bin folder (in LINUX)

SERF AGENT Core process

Maintains membership information

Propagates events

Invokes event handlers

Detects failures

Run on every node that is part of cluster

RUN SERF AGENT SERF AGENT

Cluster Membership Management

JOIN CLUSTER

CLUSTER STATUS

LEAVE CLUSTER

CLUSTER STATUS

Failure Detection and Recovery MEMBER FAILED

RECOVER MEMBER

Custom Event Propagation

Dispatches a custom user event

Nodes in the cluster listen custom events

Reacts to them

Execute Event Handlers

Doesn’t send response back to originator

Event Handler Script

Custom Event Propagation

Event Handler Execution

Dispatch Custom User Event

SERVICE ORCHESTRATION Dispatches a query

Nodes in the cluster listen query

Reacts to them

Execute Event Handlers

Send response back

Gathering Responses at originator

USE CASES Webservers and load balancers

Memcached and Redis clusters

Triggering deployments

Updating DNS records

Simple Observability

A Building Block for Service Discovery

DEMO Setting up high availability configuration(Webserver)

Serf1

eth0172.26.126.82

VIP172.26.126.84

Apache

Serf2

eth0172.26.126.74

SERF AGENT SERF AGENT

Apache

GOSSIP PROTOCOL

Limitations

Under heavy development

Events are eventually consistent

Payload size is limited

Queries may not be delivered to all nodes

Responses and acknowledgements may not be receive by query originator

ANY QUESTIONS?

Thank You!!!