Swarm cluster architecture and idea

Hello,
I will start a Swarm cluster and I have a lot of beginner questions.
I have 3 servers (each 32mb, 2 x 900Gb SSD, 4cpu) by the same provider bur in 3 différents datacenter (I have an externe IP but I can link all the servers with an internal IP) and i will make a swarm cluster with this under Debian or Ubuntu. I will used the 3 servers to have a NFS ou other cluster volume.

  • which partition can I do on each server ?
  • which volume type NFS, Ceph, ClusterFS,… can I make to have this volume ?
  • I will used docker for services like PHP, Apache, … but I read sometime the docker is not the best choice for database ?
  • For Swarm, I will have 1 manager and 2 workers…If the manager have a issue, one of the 2 worker will himself promote like the new manager ?
  • If not than I need 3 manager …so the total of my server will be 5 or I can have only 3 servers and each of them will be a manager and not a workers ?
  • If I have more than 1 manager, then I need to have a load-balancer before al there managers…Can I used this like load-balancer (each manager will have 1/3 of the requests) and I need to used only 1 manager and used a other one when the first one have a issue ?

excuse me if I have a lot of questions and maybe stupide one but I will make the good choice before that I start with the installation.

Thanks you

  1. I dont know
  2. If its for distributed data sharing, I think Ceph or GlusterFS are both fine
  3. Yes and also no. There are different oppinions on that but I wouldn’t run the DB in docker since docker can crash at some point and thus will kill the DB with it
  4. No, your swarm will stop working then
  5. Yes and no. You can make all of your nodes managers but only one will be the “real” manager. If he dies another manager will take his place. So you still only need 3 servers
  6. No, the managers don’t get the requests, its the docker services that do. You could use a loadbalancer to spread your requests between your 3 servers (the loadbalancing part has nothing to do with docker). Round robin dns could be a good choice here.