Question

How to configure one load balancer with two domains

I’m building 2 droplets 1 for api and the other for web apps.How can i create 1 load balancer for both droplets that will per domain.

For example: droplet1.com - droplet2.com both on the same load balancer

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

The main purpose of using a load balancer would be to load balance the traffic between two or more identical Droplets.

So for your case you would need to have your API and website’s content deployed on one Droplet and then replicate the content of that Droplet to another one as follows:

Load Balancing

If you want to have your API hosted on one Droplet and then your website on another Droplet, in this case, there will be no need for a load balancer.

Hope that this helps! Best, Bobby