This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
what causes the delay after start or scale? #3
Comments
More data with scaling:
|
In the meantime, I have replaced the simple hello application with my very complex full-fledged setup, comprised of web application plus data, memcached, database and search engine containers, and scaling the web application seems to be immediate. What a surprise! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Ilkka!
I spent quite some time with your most valuable work in order to learn how things work together. When trying to build my own image I ran into troubles until I found your updated version here.
This is based on consul-template 0.13.0, the newest version is 0.14.0, so I was tempted to change the Dockerfile in this respect.
I have defined a docker-compose.yml file which makes it easy to switch between the versions and scale services up and down:
At first, I thought the new version 0.14.0 had a problem, so I had a look at the version history https://github.com/hashicorp/consul-template/blob/master/CHANGELOG.md and didn't find anything.
But then I found that I just wasn't patient enough. Both versions behave exactly the same.
Obviously, consul needs quite some time to pick up changes (around 10-15 s). Registrator should communicate changes immediately, if I understand this construction correctly, but consul obviously needs time to restart HAProxy or maybe HAProxy needs time to restart.
Do you know more about the mechanisms or do you have ideas of how to find out which is responsible for the delay? Or am I making mistakes, not understanding what's happening here?
One more detail: I have defined a constant (in my case 172.17.0.1) as it didn't work with your dns instruction, and it also works with the address of the consul container (172.17.0.2 -- which isn't known beforehand for sure, though)
With these questions I only can experiment because I don't understand the underlying mechanism. In this respect, your example has helped me quite a lot so that I am confident to be able to transform the whole construction to other setups as well.
Thank you very much.
Karl
The text was updated successfully, but these errors were encountered: