Top Banner
SERF@DEVOPS PUNE RAHUL KHENGARE
19

Serf@devops pune

Feb 18, 2017

Download

Technology

Rahul Khengare
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Serf@devops pune

SERF@DEVOPS PUNERAHUL KHENGARE

Page 2: Serf@devops pune

Agenda What is Serf

Installation

Get Used To

Use Cases

Demo

Limitations

Page 3: Serf@devops pune

Target Audience

Having some knowledge of cluster environment

Managed Clusters environment

Eager to Learn SERF

Page 4: Serf@devops pune

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

Page 5: Serf@devops pune

SERF USED FOR

Cluster Membership Management

Failure Detection and Recovery

Event Propagation

Orchestration

Page 6: Serf@devops pune

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

Page 7: Serf@devops pune

SERF AGENT Core process

Maintains membership information

Propagates events

Invokes event handlers

Detects failures

Run on every node that is part of cluster

Page 8: Serf@devops pune

RUN SERF AGENT SERF AGENT

Page 9: Serf@devops pune

Cluster Membership Management

JOIN CLUSTER

CLUSTER STATUS

LEAVE CLUSTER

CLUSTER STATUS

Page 10: Serf@devops pune

Failure Detection and Recovery MEMBER FAILED

RECOVER MEMBER

Page 11: Serf@devops pune

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

Page 12: Serf@devops pune

Event Handler Script

Page 13: Serf@devops pune

Custom Event Propagation

Event Handler Execution

Dispatch Custom User Event

Page 14: Serf@devops pune

SERVICE ORCHESTRATION Dispatches a query

Nodes in the cluster listen query

Reacts to them

Execute Event Handlers

Send response back

Gathering Responses at originator

Page 15: Serf@devops pune

USE CASES Webservers and load balancers

Memcached and Redis clusters

Triggering deployments

Updating DNS records

Simple Observability

A Building Block for Service Discovery

Page 16: Serf@devops pune

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

Page 17: Serf@devops pune

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

Page 18: Serf@devops pune

ANY QUESTIONS?

Page 19: Serf@devops pune

Thank You!!!