How do you replicate volumes?

This is often a difficult decision even in Kubernetes, which is more actively developed and many new storage solutions are built only for that. There are volume plugins for Docker, but I never actually used them, especially not for Swarm

https://hub.docker.com/search?categories=Databases+%26+storage&type=plugin

I am not a Swarm user, so you can expect better answers later from Swarm users, but I guess you would need either something like GlusterFS (which supports replicas, but similar to NFS) or use S3. All of these would require network filesystems or downloading files through a rest api.

I also found an old answer from a Docker captain here: https://stackoverflow.com/a/47783308
I don’t know if the answer would be the same today, but Docker is focusing on development environments, not on Swarm, so I guess Swarm is still similar.

And now I leave this topic for more experienced Swarm users.