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,170 points
379 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,060 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,320 points
480 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,650 points
268 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
16,196 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,990 points
275 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,100 points
1,037 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,060 points
5,949 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,060 points
20,412 views