Docker Community Forums

Share and learn in the Docker community.

Elastic Load Balancing?

aws

(Kevin Carmody) #1

Hi All,

I’m having some trouble with using AWS’s Elastic Load Balancer with Docker Cloud. What I’d like is to deploy a structure as follows:

https://dl.dropboxusercontent.com/u/11663667/Moovyn%20layout%20Docker%20Cloud%20(4).png

Does anyone know how I connect the ELB to the Web App Service’s directly? Or do they need a proxy, like haproxy or nginx?

Thanks,
Kevin


(Michael Clifford) #2

Once the Docker Cloud nodes (EC2 instances in your case) are running, you can manually assign them to the ELB. However, this will require you to only have one web app service per node with the exposed port. If you want multiple web app services per node you will have to proxy them behind haproxy or nginx.


(Kevin Carmody) #3

I think my worry is having a single haproxy container as a fail point. I guess the other option would be to deploy as many haproxy services as there are nodes, then ELB against the EC2 instances.

Ok, thanks for your thoughts.


(Michael Clifford) #4

What I do is have a haproxy service deployed in per node for high-availability. I haven’t had a single issue at the service/container level with this strategy.


(Mahmoud Saada) #5

I’ve been pretty successful with one web container per node on port 80 and manually add/remove nodes to the ELB. The AWS console makes this fairly simple. You can also automate this if you use the Docker Cloud CLI with the AWS CLI. However I’m considering moving to something like Docker for AWS once that gets released since it would make all of this a much smoother experience and we get to use the latest versions of Docker instead of waiting for Docker Cloud to catch up.