load balancing using dns server in docker container.

0 votes

Hi Guys,

I have my website hosted in docker container. I want to create one load balancer, so that it can manage traffic. 

How can I implement this using dns server? 

Apr 16 in Docker by akhtar
• 10,580 points
49 views

1 answer to this question.

0 votes

Hi@akhtar,

There are lots of platform which is used for load balancing like haproxy. But you can use dns server if you want to implement load balancing in docker.

For that you have launch all your container in a same network. And create one alias as follows. 

$ docker run -it --name web --network-alias site --network bridge centos:latest
$ curl site

Now you can browse your webpage using site.

answered Apr 16 by MD
• 23,050 points

Related Questions In Docker

0 votes
1 answer

How do I scale in Docker Swarm Mode W/Terraform Digital Ocean Load Balancing

The solution you could build for Digital ...READ MORE

answered Jun 19, 2018 in Docker by shubham
• 6,910 points
354 views
0 votes
1 answer

Error: Cannot access server in docker container

Try to publish your port: docker run -p ...READ MORE

answered Sep 6, 2018 in Docker by Tyrion anex
• 8,370 points
76 views
+2 votes
6 answers

copy directories in docker container excluding any one directory

One of the way could be copy ...READ MORE

answered Dec 10, 2018 in Docker by Prateek
11,651 views
0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,540 points
144 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,530 points
538 views
0 votes
1 answer

How can I install systemctl tool in Docker container?

Hi@akhtar, In docker container if you want to ...READ MORE

answered Feb 5 in Docker by MD
• 23,050 points
709 views
0 votes
1 answer

How to install packages in a Docker container?

Hi@akhtar, To install packages in a docker container, ...READ MORE

answered Apr 15 in Docker by MD
• 23,050 points
141 views