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, 2020 in Docker by akhtar
• 38,260 points
1,368 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, 2020 by MD
• 95,460 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
• 7,340 points
1,520 views
0 votes
1 answer

Error: Cannot access server in docker container

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

answered Sep 7, 2018 in Docker by Tyrion anex
• 8,700 points
1,075 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
34,982 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,980 points
960 views
+2 votes
1 answer
+2 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
• 58,020 points
2,730 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, 2020 in Docker by MD
• 95,460 points
20,256 views
+1 vote
1 answer

How to install packages in a Docker container?

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

answered Apr 15, 2020 in Docker by MD
• 95,460 points
147,149 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP