When creating stateful services, the natural reaction is to think of a way to preserve their state. While in many cases that is the correct thing to do, in some others it isn't. It depends on service’s architecture.
Throughout this book, we explored at least two stateful services that can synchronize their state across all instances. Those are Docker Flow Proxy and MongoDB. In a nutshell, the ability to synchronize state means that when data inside one instance changes, it is capable of propagating that change to all other instances. The biggest problem with that process is how to guarantee that everyone has the same data without sacrificing availability. We'll leave that discussion for some other time and place. Instead, let us go through the docker-flow-proxy and mongo services and decide which changes (if any) we need to apply...