How to persist containers' data in swarm mode when the container goes down?

I am new to docker world and I played around with ‘Docker + Docker Compose’ for sometime. I am able to bring multiple containers at a time using compose. Also, I’m mounting data from each container to my host to persist data in case of any container failure.

Note: data on every container is different

Since all containers are running on the same machine, persisting the data after failure is not a big task.

But, when I move to swarm mode, swarm master would create containers on multiple nodes and Volumes will not be an appropriate solution to persist data.

So, how can we persist data on every containers when using swarm mode. Someone pls help me or divert me to appropriate links.

Thanks in advance :slight_smile:

look at glusterfs as distributed storage solution for docker containers across swarm

if you want an enterprise solution, look at ScaleIO from DellEMC. It’s free for development. You could also look at Ceph. REX-Ray works with both of these.