Consul uses both serf and memberlist?

What is difference between these two libraries? Both mentions both are Gossip-based Membership libraries eventually.

Hi @ursfollower ,

Welcome to the forums, and thanks for posting! There’s a lot of tech packed into Consul, but I’ll work on building from the ground up.

Memberlist is the most fundamental package when it comes to Gossip. This is the fundamental concept of node identification in Gossip. Once you have a memberlist, you need to do something with it, and that’s where Serf comes in.

Serf, as a library, can detect node failures and notify the rest of the cluster. An event system is built on top of Serf, letting you use Serf’s gossip protocol to propagate events such as deploys, configuration changes, etc.

These systems are abstracted away by Consul, so that users don’t have to manually maintain node members or registrations & failure events - simply run the agents and the system will expose those for you. There’s a great description of Serf vs Consul that provides more context as well.

I hope this helps! If so, please <3 the response :grinning_face_with_smiling_eyes:
Happy Coding,