I would need a small suggestion or a link to a guide for creating a software architecture that meets my following need based on Docker Swarm:
I have two physical machines, machine A (MA) and machine B (MB), and I need to ensure HA on a stack of applications, which we will call STACK-X. I would like STACK-X to always be running with two replicas, one on MA and one on MB (global deploy mode could be suitable?), and that my architecture is always tolerant of both a service failure or the physical failure of a machine, MA or MB.
I have tried various configurations, and the one that comes closest is MA Master (Leader) and MB Worker: it meets all the constraints except in the case of a total failure of MA. In this scenario, the services would still be reachable on STACK-X of MB, but there would be no Leader for a restart, leaving the system very vulnerable.
Thank you for any suggestions you may have.
PS. The hardware system (MA and MB) cannot be expanded in any way. The operating system is Linux 20.04 LTS.