docker-archive / for-azure

27 stars 18 forks source link

question: what does docker4x/guide-azure do? #40

Closed palmerabollo closed 7 years ago

palmerabollo commented 7 years ago

Hi. I'd like to know what is the purpose of docker4x/guide-azure.

It's calling:

storage_keys = storage_client.storage_accounts.list_keys(RG_NAME, SA_NAME)

sending 3 requests per minute and per node to the Microsoft Azure API. This API has a limit of 15K requests per hour, so if you have multiple Docker for Azure running in the same subscription, you get throttled.

I'd like to know what this service is for, to help use determine if we can stop it as a workaround until the "bug" is fixed.

Thank you.

ddebroy commented 7 years ago

@palmerabollo guide performs several activities in manager nodes like:

  1. Probing for any nodes with a dead docker daemon and restarting them.
  2. Keeping the current leader up-to-date in the Azure table used by all nodes to join the swarm.
  3. Prune images at regular intervals if user selected the option.
  4. Scan for any messages in a queue to upgrade a manager node where a rolling upgrade for the rest of the swarm was triggered from.

For workers, mainly (4) is what we need guide to perform in case of single manager deployments. If you are always deploying Docker4Azure with multiple managers as is recommended, you can safely stop and remove guide in all the worker nodes and thus not run into the cost of making the API calls that Azure counts towards the API limits. Please do not stop/remove guide on manager nodes!

palmerabollo commented 7 years ago

Thanks @ddebroy. That was helpful.