# hashicorp/serf

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hashicorp-serf).**

6,058 stars · 607 forks · Go · MPL-2.0

## Links

- GitHub: https://github.com/hashicorp/serf
- Homepage: https://github.com/hashicorp/serf/blob/master/docs/index.html.markdown
- awesome-repositories: https://awesome-repositories.com/repository/hashicorp-serf.md

## Description

Serf is a decentralized cluster coordination tool that manages node membership, failure detection, and event broadcasting across a distributed system without a central coordinator. Every node runs an identical agent process that independently handles membership, health monitoring, and event propagation through a peer-to-peer gossip protocol, creating a leaderless architecture where no single point of failure exists.

The project implements the SWIM failure detection algorithm, where each node monitors a small random subset of peers to detect unreachable or failed nodes in real time. Custom user events, such as deployment notifications or configuration changes, propagate across the cluster by piggybacking on existing gossip messages for efficient dissemination. Nodes join the cluster by specifying a single known member, with the gossip protocol automatically propagating membership information to all other nodes.

Serf provides real-time cluster topology queries from any agent's perspective, returning the set of alive and known nodes with their addresses and status. The compact binary wire format encodes membership updates, pings, and events for efficient parsing and transmission between agents over lightweight UDP datagrams.

## Tags

### DevOps & Infrastructure

- [Cluster Membership Tools](https://awesome-repositories.com/f/devops-infrastructure/cluster-coordination/gossip-protocols/cluster-membership-tools.md) — Provides decentralized cluster membership and failure detection via a gossip protocol without a central coordinator.
- [Gossip Protocols](https://awesome-repositories.com/f/devops-infrastructure/cluster-coordination/gossip-protocols.md) — Exchanges membership information through a peer-to-peer gossip protocol that converges on a consistent cluster view.
- [Gossip Cluster Joiners](https://awesome-repositories.com/f/devops-infrastructure/cluster-coordination/gossip-protocols/gossip-cluster-joiners.md) — Connects a new agent to a running cluster by pointing it to at least one known member and letting gossip handle the rest. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))
- [Gossip-Based Node Discoveries](https://awesome-repositories.com/f/devops-infrastructure/cluster-node-management/gossip-based-node-discoveries.md) — Joins new nodes to an existing cluster by specifying one known member and letting gossip propagate membership. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))
- [Decentralized Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/container-orchestration-interfaces/container-orchestrators/decentralized-orchestrators.md) — Orchestrates distributed services with automatic node discovery, health monitoring, and event propagation through peer-to-peer communication.
- [Leaderless Service Orchestrations](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/container-orchestration-interfaces/container-orchestrators/decentralized-orchestrators/leaderless-service-orchestrations.md) — Orchestrates distributed services with automatic node discovery, health monitoring, and event propagation without a leader.
- [Identical Agent Processes](https://awesome-repositories.com/f/devops-infrastructure/decentralized-instance-architectures/identical-agent-processes.md) — Implements a leaderless architecture where every node runs an identical agent process for cluster coordination.
- [Cluster and Service Orchestration](https://awesome-repositories.com/f/devops-infrastructure/infrastructure/cluster-service-orchestration.md) — Orchestrates distributed services with automatic node discovery, health monitoring, and event propagation.
- [Cluster Membership Coordination](https://awesome-repositories.com/f/devops-infrastructure/cluster-membership-coordination.md) — Lists all active nodes in the cluster along with their addresses and status to show the current cluster topology. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))

### Data & Databases

- [Custom Event Broadcasting](https://awesome-repositories.com/f/data-databases/record-updating/live-update-subscriptions/event-stream-broadcasters/custom-event-broadcasting.md) — Broadcasts custom events like deploys or configuration changes across all cluster nodes using the gossip protocol.

### Education & Learning Resources

- [Failure Detection Systems](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/infrastructure-architecture/computer-networks/networking-protocols/gossip-protocols/failure-detection-systems.md) — Detects unreachable or failed nodes in real time by monitoring health through a gossip-based SWIM algorithm.

### Networking & Communication

- [Distributed Systems Coordination](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-systems-coordination.md) — Coordinates distributed system nodes through gossip-based communication for resilience and scalability without single points of failure.
- [Node Failure Detection](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-systems-coordination/distributed-systems-configuration/heartbeat-and-timeout-configurations/node-failure-detection.md) — Detects unreachable or terminated nodes by monitoring cluster members through a gossip protocol and notifying the cluster. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))
- [Unreliable Datagram Transports](https://awesome-repositories.com/f/networking-communication/transport-layers/udp-transport-implementations/unreliable-datagram-transports.md) — Uses lightweight unreliable UDP datagrams to carry gossip and failure detection messages with minimal latency.

### Operating Systems & Systems Programming

- [SWIM Failure Detectors](https://awesome-repositories.com/f/operating-systems-systems-programming/gpu-memory-diagnostics/hardware-failure-detectors/swim-failure-detectors.md) — Implements the SWIM failure detection algorithm where each node monitors a random subset of peers in real time.

### Software Engineering & Architecture

- [Traversal Event Propagation](https://awesome-repositories.com/f/software-engineering-architecture/event-propagation-patterns/traversal-event-propagation.md) — Broadcasts custom events like deploys or configuration changes to all cluster members using the gossip protocol. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))

### Business & Productivity Software

- [Cluster Member Status and Information Listing](https://awesome-repositories.com/f/business-productivity-software/team-member-management/member-listings/cluster-member-status-and-information-listing.md) — Queries the current set of alive and known nodes from any agent's perspective to see all cluster members. ([source](https://cdn.jsdelivr.net/gh/hashicorp/serf@master/README.md))

### Programming Languages & Runtimes

- [Cluster Wire Formats](https://awesome-repositories.com/f/programming-languages-runtimes/compact-binary-formats/cluster-wire-formats.md) — Ships a compact binary wire format for encoding membership updates, pings, and events between agents.

### Part of an Awesome List

- [Microservices](https://awesome-repositories.com/f/awesome-lists/devops/microservices.md) — Service orchestration tool.
