I have loki running as a service in Nomad. The current loki is just running as a docker container with local directory mounted inside /loki path and everything loki needs to store is inside that path. Simple, but we do not need anything more.
I want to use canary deployment to have zero-downtime configuration upgrade. How canary deployment works - Nomad temporary runs two docker containers with the same path mounted. When the new instance has defined healthcheck green, the old instance is shut down.
Is it safe to run two instances of grafana loki using the same directory at the same time? Is there a locking mechanisms used to fight against concurrent accesses to files?
The documentation Filesystem | Grafana Loki documentation states that it is possible to have grafana loki in high availability mode with files on NFS. However, this does not clearly indicate if grafana loki uses locking to protect against concurrent accesses from multiple instances. Does it?
thanks! my experience with grafana loki has been great so far!