mirror of https://github.com/status-im/consul.git
Website: cleanup for intro/vs/serf.html
This commit is contained in:
parent
9aad7c14fb
commit
0c3825dda8
|
@ -3,45 +3,47 @@ layout: "intro"
|
||||||
page_title: "Consul vs. Serf"
|
page_title: "Consul vs. Serf"
|
||||||
sidebar_current: "vs-other-serf"
|
sidebar_current: "vs-other-serf"
|
||||||
description: |-
|
description: |-
|
||||||
Serf is a node discovery and orchestration tool and is the only tool discussed so far that is built on an eventually consistent gossip model, with no centralized servers. It provides a number of features, including group membership, failure detection, event broadcasts and a query mechanism. However, Serf does not provide any high-level features such as service discovery, health checking or key/value storage. To clarify, the discovery feature of Serf is at a node level, while Consul provides a service and node level abstraction.
|
Serf is a node discovery and orchestration tool and is the only tool discussed so far that is built on an eventually-consistent gossip model with no centralized servers. It provides a number of features, including group membership, failure detection, event broadcasts, and a query mechanism. However, Serf does not provide any high-level features such as service discovery, health checking or key/value storage. Consul is a complete system providing all of those features.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Consul vs. Serf
|
# Consul vs. Serf
|
||||||
|
|
||||||
[Serf](https://www.serfdom.io) is a node discovery and orchestration tool and is the only
|
[Serf](https://www.serfdom.io) is a node discovery and orchestration tool and is the only
|
||||||
tool discussed so far that is built on an eventually consistent gossip model,
|
tool discussed so far that is built on an eventually-consistent gossip model
|
||||||
with no centralized servers. It provides a number of features, including group
|
with no centralized servers. It provides a number of features, including group
|
||||||
membership, failure detection, event broadcasts and a query mechanism. However,
|
membership, failure detection, event broadcasts, and a query mechanism. However,
|
||||||
Serf does not provide any high-level features such as service discovery, health
|
Serf does not provide any high-level features such as service discovery, health
|
||||||
checking or key/value storage. To clarify, the discovery feature of Serf is at a node
|
checking or key/value storage. Consul is a complete system providing all of those
|
||||||
level, while Consul provides a service and node level abstraction.
|
features.
|
||||||
|
|
||||||
Consul is a complete system providing all of those features. In fact, the internal
|
The internal [gossip protocol](/docs/internals/gossip.html) used within Consul is in
|
||||||
[gossip protocol](/docs/internals/gossip.html) used within Consul, is powered by
|
fact powered by the Serf library: Consul leverages the membership and failure detection
|
||||||
the Serf library. Consul leverages the membership and failure detection features,
|
features and builds upon them to add service discovery. By contrast, the discovery
|
||||||
and builds upon them.
|
feature of Serf is at a node level, while Consul provides a service and node level
|
||||||
|
abstraction.
|
||||||
|
|
||||||
The health checking provided by Serf is very low level, and only indicates if the
|
The health checking provided by Serf is very low level and only indicates if the
|
||||||
agent is alive. Consul extends this to provide a rich health checking system,
|
agent is alive. Consul extends this to provide a rich health checking system
|
||||||
that handles liveness, in addition to arbitrary host and service-level checks.
|
that handles liveness in addition to arbitrary host and service-level checks.
|
||||||
Health checks are integrated with a central catalog that operators can easily
|
Health checks are integrated with a central catalog that operators can easily
|
||||||
query to gain insight into the cluster.
|
query to gain insight into the cluster.
|
||||||
|
|
||||||
The membership provided by Serf is at a node level, while Consul focuses
|
The membership provided by Serf is at a node level, while Consul focuses
|
||||||
on the service level abstraction, with a single node to multiple service model.
|
on the service level abstraction, mapping single nodes to multiple services.
|
||||||
This can be simulated in Serf using tags, but it is much more limited, and does
|
This can be simulated in Serf using tags, but it is much more limited and does
|
||||||
not provide useful query interfaces. Consul also makes use of a strongly consistent
|
not provide useful query interfaces. Consul also makes use of a strongly-consistent
|
||||||
Catalog, while Serf is only eventually consistent.
|
catalog while Serf is only eventually-consistent.
|
||||||
|
|
||||||
In addition to the service level abstraction and improved health checking,
|
In addition to the service level abstraction and improved health checking,
|
||||||
Consul provides a key/value store and support for multiple datacenters.
|
Consul provides a key/value store and support for multiple datacenters.
|
||||||
Serf can run across the WAN but with degraded performance. Consul makes use
|
Serf can run across the WAN but with degraded performance. Consul makes use
|
||||||
of [multiple gossip pools](/docs/internals/architecture.html), so that
|
of [multiple gossip pools](/docs/internals/architecture.html) so that
|
||||||
the performance of Serf over a LAN can be retained while still using it over
|
the performance of Serf over a LAN can be retained while still using it over
|
||||||
a WAN for linking together multiple datacenters.
|
a WAN for linking together multiple datacenters.
|
||||||
|
|
||||||
Consul is opinionated in its usage, while Serf is a more flexible and
|
Consul is opinionated in its usage while Serf is a more flexible and
|
||||||
general purpose tool. Consul uses a CP architecture, favoring consistency over
|
general purpose tool. In [CAP](https://en.wikipedia.org/wiki/CAP_theorem) terms,
|
||||||
availability. Serf is a AP system, and sacrifices consistency for availability.
|
Consul uses a CP architecture, favoring consistency over availability. Serf is an
|
||||||
This means Consul cannot operate if the central servers cannot form a quorum,
|
AP system and sacrifices consistency for availability. This means Consul cannot
|
||||||
while Serf will continue to function under almost all circumstances.
|
operate if the central servers cannot form a quorum while Serf will continue to
|
||||||
|
function under almost all circumstances.
|
||||||
|
|
Loading…
Reference in New Issue