0
0
AWScloud~10 mins

Cross-zone load balancing in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Cross-zone load balancing
Client sends request
Load Balancer receives request
Check cross-zone load balancing setting
Distribute evenly
Forward request
Target instances process request
Response sent back
The load balancer receives a request and decides how to distribute it based on cross-zone load balancing setting. If enabled, it spreads requests evenly across all zones; if disabled, it sends requests only to targets in the same zone as the client.
Execution Sample
AWS
Client -> Load Balancer
Load Balancer: cross-zone enabled = true
Targets in Zone A: 3
Targets in Zone B: 2
Distribute requests evenly across zones
This setup shows a load balancer with cross-zone load balancing enabled distributing client requests evenly across targets in multiple zones.
Process Table
StepActionCross-zone Enabled?Targets in Zone ATargets in Zone BRequest DistributionResult
1Client sends requesttrue32N/ARequest received by load balancer
2Load balancer checks settingtrue32EnabledWill distribute evenly across zones
3Distribute request 1true32EvenlySent to Zone A target 1
4Distribute request 2true32EvenlySent to Zone B target 1
5Distribute request 3true32EvenlySent to Zone A target 2
6Distribute request 4true32EvenlySent to Zone B target 2
7Distribute request 5true32EvenlySent to Zone A target 3
8All requests distributedtrue32EvenlyRequests balanced across zones
9Client sends requestfalse32N/ARequest received by load balancer
10Load balancer checks settingfalse32DisabledWill distribute only to targets in client's zone
11Client in Zone A sends requestfalse32Zone A onlySent to Zone A target 1
12Client in Zone B sends requestfalse32Zone B onlySent to Zone B target 1
13Requests distributed per zonefalse32Zone-specificRequests not balanced across zones
💡 Execution stops after requests are distributed according to cross-zone load balancing setting.
Status Tracker
VariableStartAfter Step 3After Step 4After Step 5After Step 6After Step 7Final
Cross-zone Enabledtruetruetruetruetruetruefalse
Requests sent to Zone A targets0112233
Requests sent to Zone B targets0011222
Key Moments - 2 Insights
Why does the load balancer send requests only to targets in the client's zone when cross-zone load balancing is disabled?
When cross-zone load balancing is disabled (see execution_table rows 10-13), the load balancer restricts requests to targets in the same zone as the client to reduce cross-zone data transfer costs.
How does enabling cross-zone load balancing affect request distribution?
Enabling cross-zone load balancing (execution_table rows 2-8) causes the load balancer to distribute requests evenly across all healthy targets in all zones, improving load distribution.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 5. Which target receives the request?
AZone B target 1
BZone A target 2
CZone A target 1
DZone B target 2
💡 Hint
Check the 'Request Distribution' and 'Result' columns at step 5 in execution_table.
At which step does the load balancer distribute requests only to targets in the client's zone?
AStep 2
BStep 6
CStep 10
DStep 8
💡 Hint
Look for when 'Cross-zone Enabled?' is false and distribution is zone-specific in execution_table.
If cross-zone load balancing is enabled, how many requests are sent to Zone B targets after 7 requests?
A2
B3
C4
D1
💡 Hint
Refer to variable_tracker row 'Requests sent to Zone B targets' after step 7.
Concept Snapshot
Cross-zone load balancing controls how a load balancer distributes requests across availability zones.
Enabled: requests spread evenly across all zones' targets.
Disabled: requests sent only to targets in the client's zone.
Improves fault tolerance and load distribution.
May increase cross-zone data transfer costs when enabled.
Full Transcript
Cross-zone load balancing is a setting on a load balancer that decides how client requests are distributed across multiple availability zones. When enabled, the load balancer sends requests evenly to all healthy targets in all zones, balancing the load well. When disabled, it sends requests only to targets in the same zone as the client, which can reduce cross-zone data transfer costs. The execution table shows step-by-step how requests are distributed differently based on this setting. The variable tracker shows how many requests each zone's targets receive over time. Key moments clarify why the load balancer behaves differently depending on the setting. The visual quiz tests understanding of request distribution at specific steps.