Distributing Traffic in AWS Availability Zones | Solutions Architect Exam Answer

Distribute Traffic in Multiple Availability Zones

Prev Question Next Question

Question

You have multiple EC2 instances in three availability zones (AZs), with a load balancer configured for your application.

Any instance can process the requests and there is no need to route the requests for a particular session to the same EC2 instance.

However, you observe that only one of those AZs is receiving all the traffic.

Which of the following actions may help distribute the traffic in three AZs? (Select TWO).

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A, C.

Since the traffic is routed to only one availability zone (AZ) and none of the other AZs are receiving any, the ELB must have only one AZ registered in it.

First, you have to ensure that the ELB is configured to support multiple AZs via Cross-Zone load balancing.

Even after enabling the cross zone load balancing, if the traffic is routed to particular EC2 instances in an AZ, the users' sessions must have tied to those EC2 instances.

These symptoms seem to be related to the sticky sessions (session affinity)

So, the second thing you must ensure that the sticky sessions need to be either disabled or configured to be expiring after a specific period.

Option A is CORRECT because, as mentioned above, sticky sessions could be a reason for traffic being routed to specific EC2 instances in a specific AZ.

Option B is incorrect because reducing the health check frequency will not balance the traffic between different AZs.

Option C is CORRECT because cross zone load balancing needs to be enabled on the ELB and the other AZs must be registered under this ELB.Option D is incorrect because there is no such recommendation from Amazon about ELB.More information on ELB, Sticky Sessions, and Cross Zone Load Balancing:

https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html
Edit stickiness

okie stickine

okie stickines:

The issue described in this question suggests that the Elastic Load Balancer (ELB) is not distributing traffic evenly across all three Availability Zones (AZs) where your EC2 instances are deployed. To fix this, you should consider the following two options:

  1. Enable Cross-Zone Load Balancing: Enabling Cross-Zone Load Balancing allows the ELB to distribute traffic evenly across all the registered instances, regardless of the AZ they belong to. This means that traffic from any client will be distributed across all the instances in all the AZs that are registered with the ELB. To enable this feature, you should go to your Load Balancer's configuration and select the option "Enable Cross-Zone Load Balancing". This should help distribute the traffic more evenly across all the AZs.

  2. Disable Sticky Sessions: Sticky sessions is a feature of the ELB that allows the same client to be directed to the same instance in order to maintain session state. If you have disabled sticky sessions, the ELB will distribute traffic evenly across all instances regardless of their state. If you're not using sticky sessions and your traffic is still being directed to a single AZ, it's possible that some instances are not healthy or are underutilized, which is causing the ELB to direct traffic to the instances in the healthy AZ. To disable this feature, you should go to your Load Balancer's configuration and select the option "Disable Sticky Sessions".

Reducing the frequency of health checks may not help distribute traffic to all the AZs as the ELB will still direct traffic to the healthy instances regardless of their AZ. Additionally, Amazon recommends using at least two AZs for high availability and fault tolerance, but this is not relevant to the current issue. Therefore, the correct answers to this question are A and C.