The Problem is: When I copy the Front End IP of the Load Balancer and pasting in the browser, it is not showing any output like:
On VM Side, I have enabled the ports 80, 443, and 22 in the NSG for both of the VMs.
If that output comes, then I can hit the refresh page many times to see the load is distributing between the two VMs that shows "This is VM1" from VM2.
I tried to reproduce the same in my environment and got the results like below:
I have created a virtual machine with:
zone 1
with Inbound port as HTTP(80) and SSH (22)
zone 2
with inbound port as HTTP(80) and SSH (22)
Then I have installed Apache web server Renamed the index.html for both vm like below:
Vm1
VM2
Created a load balancer type select as public
in frontend ip created new public ip:
Added two virtual machines in backend pool and Add health probe. After creating load balancer verify public Ip address are same assigned in your both virtual machine.
Then add Load balancer rule port 80 like below:
Now, when I copy the Frontend IP of the Load Balancer and pasting in the browser I got result successfully like below:
Sometimes if we refresh, we can't redirect to another server keep being active on the server open another tab refresh it it will redirect multiple vm
I have created two ubuntu vm with availability set on same region and vnet of Apache installed.
Then created with Internal Load Balancer:
Then added same Front End IP -> Back End Pool -> Health Probe -> And Load Balancing Rule TCP as 80 port
According to MSDocs
If your application hosted in the backend VM of an internal load balancer is trying to access another application hosted in the same backend VM over the same network interface, it's an unsupported scenario and will fail.
You need to create another test virtual machine with windows server to access RDP with same virtual network or while peering vnet you can access it while peering Basic LB has some limitations over Vnet peering
I have created another Vm and connected to remote desktop here, when I try to access Front end IP of the Load Balancer, I got result successfully like below.