Docker Community Forums

Share and learn in the Docker community.

How to handle zone apex with service endpoints

(Taylor) #1

To me a lump in Docker Cloud that I’ll have to swallow is a round-robin service endpoint that pales in comparison to a real load-balancer. For one, it worries me how frequently the UUID may or may not change as I deploy my Stackfile over and over to different node sets.

My biggest challenge in migration as I see it is in handling a zone apex – the so-called naked domain, Does anyone have any advice on how to tackle this?

How to assign a domain name to a docker cloud service?
(Geoff Bowers) #2

You should be able to “flatten” the APEX record and have it point to a CNAME with most modern DNS services; for example, CloudFlare or AWS Route53:

Are you binding the service endpoint itself to port 80 on the node? Or are you using an HAPROXY container to front the service?

(Andrew) #3

We use HAPROXY, with an ELB using AWS, and using an ELB presence docker container(, to register each node onto the ELB. That may seem like a bit of a long way around, but it makes it easy to add more nodes. It also means you get the advantage of load balancing options above round robin.

(Geoff Bowers) #4

Thanks for that tip! Looks like a handy little utility since we’ve been considering ELBs ourselves. I assume you just deploy every_node and it works like magic?

(Andrew) #5

Yep, that is how we use it. And we have HAPROXY on every_node as well, then the HAPROXY just has links to the respective containers.

(Geoff Bowers) #6

What specific features of AWS ELB do you find useful here beyond alternatives to round robin? And in what scenarios do you use something other than round robin?

(Andrew) #7

We personally use it mainly for the health check, and SSL termination. From what I understand there are some more options then just plain round robin.

(Taylor) #8

How do you guys get this working on Cloud? I don’t see this deployment strategy in the dropdown. Do I use a Stackfile config line?

(Andrew) #9
  image: ''
  deployment_strategy: every_node
    - AWS_REGION=us-west-1
    - ELB_NAME=
    - ls-stage

Here is an example of our stackfile that we use (minus the our codes), we use the tags for the environment, not sure if you need that or not.

You can get some documentation from here:

(Taylor) #10

Heads up that every_node may not be available in Docker Cloud. It’s not in the drop downs for deployment strats and when you using it, I get an error.

I should be wrong: This was in Tutum and “Docker Cloud is a new service by Docker that implements all features previously offered by Tutum”

(Andrew) #11

We use Every_node on Docker Cloud. From what I understand you can’t change to every_node, you have to create the service as every_node.