Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent storage / replicated volume recommendation for docker swarm mode in 2020 #50

Closed
OCram85 opened this issue Jul 10, 2020 · 11 comments
Labels

Comments

@OCram85
Copy link

OCram85 commented Jul 10, 2020

Hi,
It would be awesome to have a guide or a recommendation what kind of solutions could be used to set up replicated volumes.
I recently looked into solutions like GlusterFS, Ceph, REX-Ray...

@tiangolo
Copy link
Owner

Yeah, the thing is that I don't have a recommendation for that. I don't think any of the currently available tools solve all the related problems.

For example, you probably wouldn't put the files of a SQL DB in one of those systems.

They would work best for binary files stored as blobs that can be retrieved and saved, etc. But not constantly updated, indexed, etc. And in those cases, I would think MinIO could work better.

@OCram85
Copy link
Author

OCram85 commented Aug 17, 2020

You're absolutely right.
I think it would be helpful to compare some current solutions with your mentioned use cases. It seems to be a good starting point for new docker swarm users which are looking for best practice implementation. As a beginner it's quite hard to find a simple route in 2020 for replicated volumes.

Maybe it would also help to list the mostly used products in 2020 and describe some implemtations for some use cases?

@github-actions github-actions bot removed the answered label Aug 17, 2020
@ramonck
Copy link

ramonck commented Sep 1, 2020

Hey,

Maybe Galera is a good approach? I have not tested just found it in my searches. Insteresting because of the realtime round-robin thing so if falls in real-time another DB takes over due to the realtime replication no loss, sounds interesting. Not sure how it works in practice.
https://blog.ruanbekker.com/blog/2019/05/10/running-a-ha-mysql-galera-cluster-on-docker-swarm/

Looking at the Galera site, MercadoLivre uses Galera.. they're the eBay of Latin America: https://galeracluster.com/

This looks like a paid product and they say to have a free version: https://severalnines.com/product/clustercontrol

@ramonck
Copy link

ramonck commented Sep 1, 2020

@MichaelLeeHobbs
Copy link

We use swarm in production with 80+ containers. In our environment ie AWS we use EFS for persistence. We have EFS mounted to all the swarm nodes and the docker files map the volumes to the efs mount. Works well for the small amount of persistence we need. EFS is expensive so if you had a large volume of data that needed persistence I'd use something else. As a general note, we will be moving to k8s so I'm not sure what we will do in the future. Overall, some sort of NFS mount has worked well in my experience. It's also simple to use once setup.

@pascalandy
Copy link

pascalandy commented Dec 9, 2020

I use Resilio at the moment. But I'm about to switch to this.

To be clear, this has nothing to do with Swarm. It's just a folder that syncs between my nodes.

@Ivanello
Copy link

guys, what can You say about this option?
https://github.com/vieux/docker-volume-sshfs

@yolombana
Copy link

Hola yo utilizo una infraestructura de almacenamiento distribuido con glusterfs replicado en 6 maquinas generando 6 volúmenes replicados con un quórum del 48% y funcionado en un cluster de docker swarm. Funciona bien. Solo debes tener cuidado con el cerebro dividido

@decentral1se
Copy link

moby/moby#39624

@tiangolo
Copy link
Owner

I should let you know, that I had to deprecate this website and ideas, I would no longer recommend Docker Swarm Mode for new projects: https://dockerswarm.rocks/swarm-or-kubernetes/ 🥲

@OCram85
Copy link
Author

OCram85 commented Dec 11, 2023

Thanks for the update on this.

Btw, I decided using NFS for volumes and still using docker swarm in production ;).

@OCram85 OCram85 closed this as completed Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants