Routing to your containers

You need to consider how are you going to route requests among your containers if you have multiple hosts.

For example, if you have an external load balancer, such as an ELB in AWS or a dedicated device in front of an on-premise cluster, do you have the ability to dynamically add routes for traffic hitting port x on your load balancer to port y on your Docker hosts, at which point the traffic is then routed through to your container?

If you have multiple containers that all need to be accessible on the same external port, how are you going handle that?

Do you need to install a proxy such as Traefik (https://traefik.io/), HAProxy (http://www.haproxy.org/), or NGINX (https://nginx.org/) to accept and then route your requests based on virtual hosts based on domains or subdomains, rather than just using port-based routeing?

For example, you could use just ports for a website, everything on ports 80 and 443 to the container that is configured by Docker to accept traffic on those ports. Using virtual host routing means that you can route domain-a.com to container a and then domain-b.com to container b and that both domain-a.com and domain-b.com can point toward the same IP address and port.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset