Complete the code to specify the protocol for the load balancing rule.
load_balancer_rule = {
"name": "myLoadBalancingRule",
"protocol": "[1]",
"frontendPort": 80,
"backendPort": 80
}The protocol for load balancing rules is typically set to TCP or UDP. Here, TCP is the correct choice for HTTP traffic.
Complete the code to set the frontend port for the load balancing rule.
load_balancer_rule = {
"name": "myLoadBalancingRule",
"protocol": "TCP",
"frontendPort": [1],
"backendPort": 80
}The frontend port is the port on which the load balancer listens. Port 80 is standard for HTTP traffic.
Fix the error in the load balancing rule by completing the backend port correctly.
load_balancer_rule = {
"name": "myLoadBalancingRule",
"protocol": "TCP",
"frontendPort": 80,
"backendPort": [1]
}The backend port should match the port on which the backend servers listen. For HTTP, this is usually port 80.
Fill both blanks to configure the load balancing rule with the correct frontend IP configuration and idle timeout.
load_balancer_rule = {
"name": "myLoadBalancingRule",
"frontendIPConfiguration": [1],
"idleTimeoutInMinutes": [2]
}The frontend IP configuration must reference the frontend IP, here "frontendIPConfig1". The idle timeout is commonly set to 30 minutes to keep connections alive.
Fill all three blanks to complete the load balancing rule with correct protocol, load distribution, and enable floating IP.
load_balancer_rule = {
"name": "myLoadBalancingRule",
"protocol": "[1]",
"loadDistribution": "[2]",
"enableFloatingIP": [3]
}The protocol is set to TCP for reliable connections. Load distribution by SourceIP ensures requests from the same client go to the same backend. Floating IP enabled (true) allows direct server return traffic.