Bird
Raised Fist0
Azurecloud~10 mins

Backend pools and health probes in Azure - Step-by-Step Execution

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Process Flow - Backend pools and health probes
Start: Client sends request
↓
Load Balancer receives request
↓
Check backend pool members
↓
Health probe checks each backend
↓
Is backend healthy?
No→Skip backend
Yes↓
Forward request to healthy backend
↓
Response sent back to client
The load balancer receives client requests, checks backend servers' health using probes, and forwards requests only to healthy servers.
Execution Sample
Azure
1. Define backend pool with 3 servers
2. Configure health probe on port 80
3. Load balancer checks health probe
4. Forward requests to healthy servers only
This setup ensures traffic goes only to servers that respond positively to health probes.
Process Table
StepActionBackend Server StatusHealth Probe ResultRequest Forwarded To
1Load balancer receives requestServer1: Unknown, Server2: Unknown, Server3: UnknownNo probe yetNone
2Health probe checks Server1Server1: HealthyProbe successNone
3Health probe checks Server2Server2: UnhealthyProbe failureNone
4Health probe checks Server3Server3: HealthyProbe successNone
5Forward request to healthy backendServer1: Healthy, Server3: HealthyProbe successServer1 or Server3
6Response sent back to clientServer1: Healthy, Server3: HealthyProbe successRequest completed
💡 Request forwarded only to servers passing health probes; unhealthy servers skipped.
Status Tracker
VariableStartAfter Step 2After Step 3After Step 4Final
Server1 StatusUnknownHealthyHealthyHealthyHealthy
Server2 StatusUnknownUnknownUnhealthyUnhealthyUnhealthy
Server3 StatusUnknownUnknownUnknownHealthyHealthy
Request Forwarded ToNoneNoneNoneNoneServer1 or Server3
Key Moments - 3 Insights
Why does the load balancer skip Server2 even though it is in the backend pool?
Because the health probe failed for Server2 (see Step 3 in execution_table), marking it unhealthy, so the load balancer does not forward requests to it.
What happens if all backend servers fail the health probe?
The load balancer will not forward requests to any backend, resulting in failed or delayed responses, as no healthy servers are available (not shown in this trace but implied by the health probe logic).
Can the load balancer forward requests to multiple servers at once?
No, it forwards each request to one healthy backend server at a time, balancing load among healthy servers (Step 5).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is Server2's status after Step 3?
AHealthy
BUnhealthy
CUnknown
DSkipped
💡 Hint
Check the 'Backend Server Status' column at Step 3 in execution_table.
At which step does the load balancer forward the request to a backend server?
AStep 2
BStep 3
CStep 5
DStep 6
💡 Hint
Look for 'Request Forwarded To' column in execution_table.
If Server3 became unhealthy, how would the 'Request Forwarded To' value change at the final step?
ARequest forwarded to Server1 only
BRequest forwarded to Server3 only
CRequest forwarded to Server2 only
DRequest forwarded to all servers
💡 Hint
Refer to variable_tracker for Server3 status and execution_table logic for forwarding.
Concept Snapshot
Backend pools group servers to receive traffic.
Health probes check if servers are healthy.
Load balancer sends requests only to healthy servers.
Unhealthy servers are skipped to avoid errors.
Health probes run regularly to update server status.
Full Transcript
When a client sends a request, the load balancer receives it and checks which backend servers are healthy using health probes. Each backend server is checked by sending a probe request, usually on a specific port like 80. If the server responds correctly, it is marked healthy; otherwise, unhealthy. The load balancer then forwards the client request only to healthy servers, skipping any unhealthy ones. This ensures reliable and efficient traffic distribution. If all servers are unhealthy, requests cannot be forwarded, causing failures. This process repeats continuously to keep backend status updated.

Practice

(1/5)
1. What is the main purpose of a backend pool in Azure Load Balancer?
easy
A. To create virtual networks
B. To monitor the health of servers
C. To store user data securely
D. To group servers that will share incoming user requests

Solution

  1. Step 1: Understand backend pool role

    A backend pool groups multiple servers to distribute incoming traffic among them.
  2. Step 2: Differentiate from health probes

    Health probes check server status, but backend pools organize servers for load balancing.
  3. Final Answer:

    To group servers that will share incoming user requests -> Option D
  4. Quick Check:

    Backend pool = group servers for requests [OK]
Hint: Backend pools group servers; health probes check server status [OK]
Common Mistakes:
  • Confusing backend pools with health probes
  • Thinking backend pools store data
  • Mixing backend pools with network creation
2. Which of the following is the correct way to define a health probe in Azure Load Balancer configuration?
easy
A. healthProbe: { protocol: 'TCP', port: 80, intervalInSeconds: 15, numberOfProbes: 2 }
B. healthProbe: { protocol: 'FTP', port: 21, intervalInSeconds: 10, numberOfProbes: 3 }
C. healthProbe: { protocol: 'HTTP', port: 8080, intervalInSeconds: 5, numberOfProbes: 1 }
D. healthProbe: { protocol: 'UDP', port: 53, intervalInSeconds: 20, numberOfProbes: 4 }

Solution

  1. Step 1: Identify valid protocols for health probes

    Azure Load Balancer supports TCP and HTTP probes; FTP and UDP are invalid.
  2. Step 2: Check probe parameters

    healthProbe: { protocol: 'TCP', port: 80, intervalInSeconds: 15, numberOfProbes: 2 } uses TCP on port 80 with reasonable intervals and probe counts, matching best practices.
  3. Final Answer:

    healthProbe: { protocol: 'TCP', port: 80, intervalInSeconds: 15, numberOfProbes: 2 } -> Option A
  4. Quick Check:

    Valid protocol and settings = healthProbe: { protocol: 'TCP', port: 80, intervalInSeconds: 15, numberOfProbes: 2 } [OK]
Hint: Use TCP or HTTP protocols for health probes in Azure [OK]
Common Mistakes:
  • Using unsupported protocols like FTP or UDP
  • Setting too few probes causing false negatives
  • Choosing invalid port numbers
3. Given this health probe configuration:
protocol: 'HTTP', port: 8080, intervalInSeconds: 10, numberOfProbes: 3

If the backend server responds successfully on the first two probes but fails on the third, what will Azure Load Balancer do?
medium
A. Mark the server as unhealthy immediately after the first failure
B. Mark the server as unhealthy after three consecutive failures
C. Ignore the probe results and keep the server in the pool
D. Keep the server as healthy because two successful probes passed

Solution

  1. Step 1: Understand numberOfProbes meaning

    numberOfProbes defines how many consecutive failed probes mark a server unhealthy.
  2. Step 2: Analyze probe results

    Only one failure occurred, so the server is still healthy until 3 consecutive failures happen.
  3. Final Answer:

    Mark the server as unhealthy after three consecutive failures -> Option B
  4. Quick Check:

    3 failures needed to mark unhealthy = Mark the server as unhealthy after three consecutive failures [OK]
Hint: Server unhealthy after consecutive failed probes count reached [OK]
Common Mistakes:
  • Marking unhealthy after a single failure
  • Ignoring the numberOfProbes setting
  • Assuming any failure removes server immediately
4. You configured a backend pool with three servers and a health probe. One server is always marked unhealthy even though it is running fine. What is the most likely cause?
medium
A. Backend pool has too many servers
B. Load balancer is not assigned a public IP
C. Health probe is configured with the wrong port or protocol
D. The backend server is overloaded with traffic

Solution

  1. Step 1: Check health probe configuration

    If the probe uses the wrong port or protocol, it will fail to get a healthy response from the server.
  2. Step 2: Rule out other causes

    Too many servers or missing public IP do not cause probe failures; overload affects performance but not probe success directly.
  3. Final Answer:

    Health probe is configured with the wrong port or protocol -> Option C
  4. Quick Check:

    Wrong probe config causes false unhealthy status [OK]
Hint: Check probe port and protocol if server shows unhealthy wrongly [OK]
Common Mistakes:
  • Blaming backend pool size for probe failures
  • Ignoring probe configuration details
  • Assuming public IP affects probe health
5. You want to ensure high availability for your web app using Azure Load Balancer. You have three backend servers and want to configure health probes and backend pools. Which combination best improves reliability and performance?
hard
A. Create a backend pool with all three servers and a TCP health probe on port 80 with 5-second intervals and 2 probes
B. Create separate backend pools for each server and no health probes
C. Create a backend pool with two servers only and an HTTP health probe on port 8080 with 30-second intervals and 5 probes
D. Create a backend pool with all servers and a health probe using unsupported protocol FTP

Solution

  1. Step 1: Use a single backend pool for load distribution

    Grouping all servers in one backend pool balances traffic and improves availability.
  2. Step 2: Configure a valid health probe with appropriate settings

    TCP probe on port 80 with short intervals and few probes quickly detects unhealthy servers.
  3. Step 3: Evaluate other options

    Separate pools reduce load balancing benefits; no probes risk sending traffic to bad servers; unsupported protocols cause failures.
  4. Final Answer:

    Create a backend pool with all three servers and a TCP health probe on port 80 with 5-second intervals and 2 probes -> Option A
  5. Quick Check:

    All servers + valid probe = best reliability [OK]
Hint: Use all servers in one pool with valid health probe for best uptime [OK]
Common Mistakes:
  • Splitting servers into multiple pools unnecessarily
  • Skipping health probes
  • Using unsupported protocols for probes