The load balancing rule maps incoming traffic on the frontend port to a specified backend port. Here, port 80 on the frontend is mapped to port 8080 on backend VMs, so traffic is forwarded accordingly.
Setting session persistence to 'Client IP' ensures that all requests from the same client IP address are directed to the same backend VM, maintaining session stickiness.
Each load balancing rule is associated with one frontend IP configuration and one backend pool. To support multiple frontend IPs for different services sharing the same backend pool, create separate rules for each frontend IP.
The NSG associated with the backend VMs should allow inbound traffic on port 443 and deny other ports. This ensures only HTTPS traffic reaches the backend VMs, as the Load Balancer forwards traffic to this port.
Health probes monitor backend VM health on a specified port. Associating the probe with the load balancing rule ensures traffic is only sent to healthy VMs.