Multi-Domain Azure Load Balancer using 1 public IP address

Milen Denev 91 Reputation points
2021-02-18T11:15:46.94+00:00

I have a very specific question about Azure Load Balancer
I have the following scenario:

Let's say I have many VMs that host different services / websites. Each VM has it own websites and each website is accessed via it's own domain :
(http://domain1.com -> Website1, http://domain2.com -> Website2 etc).

As A Record I have the public IP address associated with the VM:
(20.1.1.1 -> http://domain1.com -> Website1, 20.1.1.2 -> http://domain2.com -> Website2 ).

Can I use Load Balancer , and by having 1 public IP address do the same job? Is it possible?
( 20.1.1.1 -> 10.0.0.1 -> http://domain1.com -> Website1 and 20.1.1.1 -> 10.0.0.2 -> http://domain2.com -> Website2)

I didn't find any clear answer to this question.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
617 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,364 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,228 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
413 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lucas Camargo Reis 86 Reputation points
    2021-02-19T13:13:20.853+00:00

    HI @Milen Denev

    You can use one Loab Balancer but to use the same port (80) to different backends you need to have two differentes frontend IPs.

    Load Balancer is a Layer 4 and work with TCP Ports, you can use a Apllication Gateway to address your need. Application Gateway is a Layer 7 and it can publish differents urls using the same frontend ip.

    See more information on this link: https://learn.microsoft.com/en-us/azure/application-gateway/create-multiple-sites-portal

    0 comments No comments

0 additional answers

Sort by: Most helpful