I’ve started to work with volumes but, I get some issues with the problem that I am trying to solve.
The scenario is the next: I have webservers running into docker containers, that webservers are generating stats files that should be send every second. To solve that problem I think into spear the stats sender from the webservers into a new container, to do that, I thought in 3 different approaches but I am not sure about which one is the best or if is there other alternatives
Solution 1: Each webserver have an “stats” volume, I run a new stats container every second with the volumes of all containers to send the metrics. Is it ok run a new container every seccond ?
Solution 2: Create a container with the stats sender with an “stats” volume, every webserver mounts the volume of the stats container. The problem here is, how can I change the image of the stats container if I should to upgrade it ?
Solution 3: Use a volume from a host folder mounted in both (webserver and containers)
Can you help me to choose the best solution ?
Thanks in advance