Project advise - Modbus Master docker HA cluster

Hi, im new to this… I am looking to run my modbus TCP master application in a docker cluster. I need to run only one instance of the container but it should start on the other nodes if it goes down. I have read a bit and it seems there is a manager needed for that. Can every node be a Manager and Worker at the same time? In that case it just starts the container if parts of the network fail. What happens to the data if the previous node if the connection between the devices drops and reconnects? Does docker sync or replicates the data between the nodes or do i need shared storage?