As we move into this world of loosely connected VMs, containers, and servers we need a layer that tells everything where everything else is. Serf is Hashicorp’s solution for this problem.
Serf is a decentralized solution for service discovery and orchestration that is lightweight, highly available, and fault tolerant.
Are you wondering why you might need this? Let’s say you have an app that requires Redis. You could put Redis inside your container, but then every app server you push would have its own copy of Redis. Instead you might want to have a Redis container and an app container.
Of course, when you only have two containers it wouldn’t be hard to hand manage the connection. When you increase the number of elements in the system the complexity increases as well. This is where service orchestration come in. It helps handle the complexity. Serf is one solution to this problem.