hydra-router
hydra-router copied to clipboard
Time drift issue when running hydra-router in a docker swarm on a Mac.
If you run a docker swarm locally (using docker stack
) and have a hydra microservice that you're developing / testing outside of the swarm you may notice that the hydra-router dashboard will show your test service as being unavailable. The time difference might be 6-12 seconds.
This is a known docker engine (on mac) time drift issue.
- https://github.com/docker/for-mac/issues/1260
- https://github.com/docker/for-mac/issues/2076
To resolve this just reset your docker engine. You can do that by 1) clicking on the docker for mac icon 2) selecting the reset bomb 3) pressing the Restart button. That will restart the docker engine then you can reload the swarm.
This is still an issue after Docker Version 17.12.0-ce-mac49 (21995)
The issue, I'm told, is that on the Mac we have an embedded Linux VM which can get out of sync with the Mac itself. When running in production on Linux machines a Linux VM isn't necessary.
@cjus -- Have you tried, in your docker container, to add NTP or something similar, to coordinate the date/time between the underlying Mac and the container? Even in production time shift is a normal thing so it's important to make sure all machines in the swarm run NTP (IMHO) .. even if pure Linux