2015-09-18 00:59:45 +00:00
---
layout: "docs"
page_title: "Gossip Protocol"
sidebar_current: "docs-internals-gossip"
description: |-
2015-09-20 20:37:22 +00:00
Nomad uses a gossip protocol to manage membership. All of this is provided
through the use of the Serf library.
2015-09-18 00:59:45 +00:00
---
# Gossip Protocol
2015-09-20 20:37:22 +00:00
Nomad uses a [gossip protocol ](https://en.wikipedia.org/wiki/Gossip_protocol )
2016-08-08 16:47:59 +00:00
to manage membership. This is provided through the use of the [Serf library ](https://www.serf.io/ ).
2015-09-18 00:59:45 +00:00
The gossip protocol used by Serf is based on
2018-06-22 08:09:32 +00:00
["SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol" ](https://www.cs.cornell.edu/projects/Quicksilver/public_pdfs/SWIM.pdf ),
2016-08-08 16:47:59 +00:00
with a few minor adaptations. There are more details about [Serf's protocol here ](https://www.serf.io/docs/internals/gossip.html ).
2015-09-18 00:59:45 +00:00
~> **Advanced Topic!** This page covers technical details of
2015-09-20 20:37:22 +00:00
the internals of Nomad. You do not need to know these details to effectively
2015-09-18 00:59:45 +00:00
operate and use Nomad. These details are documented here for those who wish
to learn about them without having to go spelunking through the source code.
## Gossip in Nomad
2015-09-25 00:05:42 +00:00
Nomad makes use of a single global WAN gossip pool that all servers participate in.
2015-09-18 00:59:45 +00:00
Membership information provided by the gossip pool allows servers to perform cross region
requests. The integrated failure detection allows Nomad to gracefully handle an entire region
losing connectivity, or just a single server in a remote region. The gossip protocol
is also used to detect servers in the same region to perform automatic clustering
via the [consensus protocol ](/docs/internals/consensus.html ).
2016-08-08 16:47:59 +00:00
All of these features are provided by leveraging [Serf ](https://www.serf.io/ ). It
2015-09-18 00:59:45 +00:00
is used as an embedded library to provide these features. From a user perspective,
this is not important, since the abstraction should be masked by Nomad. It can be useful
however as a developer to understand how this library is leveraged.