Load balancing rules define how the traffic is distributed to the VMs inside the backend pool. When you create a new rule, you define the frontend IP configuration for incoming traffic, the backend IP pool that receives the traffic, and the required source and destination ports.
The rule that we are going to create listens to port 80 at the frontend. The rule then sends the network traffic to the backend pool, also on port 80.
To create the rule, take the following steps:
- Again, open the Load Balancer resource.
- Under Settings, select Load balancing rules, and then select Add:
Creating a new rule
- Add the following values:
- Name: PacktLoadBalancerRule
- Frontend IP address: LoadBalancerFrontEnd
- Protocol: TCP
- Port: 80
- Backend port: 80
- Backend pool: PacktLBBackendPool
- Health probe: PacktHealthProbe
- Click OK:
Configuring the rule