So I tried using swarm. My use case is following:
I have 3 Raspberrys and my Desktop PC. With my Desktop PC I created a swarm and with the Raspberrys I joined the swarm. I wanted to deploy a container on each Raspberry. Therefore I drained the manager and started the service in global mode, which correctly started a container on each device. On each device was a script generating random data, which should be sent via a http request to the container. I have to send a http request to the container so start the http server within the container. When starting the script the data will be sent to the container correctly. The problem is however, that the Request on 1 Device, whill start the http server on all devices. Starting the http server on another device will tell me that it is already running. So apparently swarm does something that the state of the devices is the same, I guess ?!? And further starting the containers manually on the devices everything works perfectly, but with swarm I get ErrorMessages inside the container, which I cant explain.
It seems like I don’t really understand what swarm does with the containers. Therefore I’d like to ask for advice, if this use case (Containers on different Device with different behavior depending on the http request) is actually feasible with swarm. And if not, some resource where I could read whats happening, so that I can at least explain, why its not possible with swarm.