exam questions

Exam ANS-C00 All Questions

View all questions & answers for the ANS-C00 exam

Exam ANS-C00 topic 1 question 91 discussion

Exam question from Amazon's ANS-C00
Question #: 91
Topic #: 1
[All ANS-C00 Questions]

An organization is migrating its on-premises applications to AWS by using a lift-and-shift approach, taking advantage of managed AWS services wherever possible. The company must be able to edit the application code during the migration phase. One application is a traditional three-tier application, consisting of a web presentation tier, an application tier, and a database tier. The external calling client applications need their sessions to remain sticky to both the web and application nodes that they initially connect to.
Which load balancing solution would allow the web and application tiers to scale horizontally independent from one another other?

  • A. Use an Application Load Balancer at the web tier and a Classic Load Balancer at the application tier. Set session stickiness on both, but update the application code to create an application-controlled cookie on the Classic Load Balancer.
  • B. Use an Application Load Balancer at both the web and application tiers, setting session stickiness at the target group level for both tiers.
  • C. Deploy a web node and an application node as separate containers on the same host, using task linking to create a relationship between the pair. Add an Application Load Balancer with session stickiness in front of all web node containers.
  • D. Use a Network Load Balancer at the web tier, and an Application Load Balancer at the application tier. Enable session stickiness on the Application Load Balancer, but take advantage of the native WebSockets protocols available to the Network Load Balancer.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
inf
Highly Voted 3 years, 7 months ago
Answer: A A - correct - sticky ALB + sticky CLB + cookie. Also caters for non-web based app tier given its a traditional 3-tier app. App must be editable (e.g. to include a cookie) B - incorrect - traditional app tier, unlikely to use HTTP/HTTPS, which can't sit behind an ALB C - incorrect - can't scale horizontally independent of each other. D - incorrect - NLBs maintain the same target for the "life of the connection", unlike cookies which persist. Also, no idea if app tier is web based, could be TCP
upvoted 12 times
droop72
3 years, 7 months ago
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#sticky-session The reason to scratch B maybe: If you are using multiple layers of Application Load Balancers, you can enable sticky sessions on one layer only, because the load balancers would use the same cookie name.
upvoted 4 times
...
jerac58653
3 years ago
I am not a developer but as they say "including a web display layer", I would assume we are talking here about an web app. Why would otherwise have a web layer if you do not have web application. And if it is web application, it is using HTTP/HTTPs, so ALB is possible. As somebody mentioned, application-based cookies should work independently with 2 ALBs. A seems also possible but more difficult to realize.
upvoted 2 times
...
...
eeghai7thioyaiR4
Highly Voted 3 years, 7 months ago
In that architecture, you have a tier serving HTML/JS, a tier serving some kind of API, and a database tier So clients connects to both the first two tiers, directly The right answer is B ALB stickyness uses a cookie called AWSALBAPP by default, to map a customer to a backend, across requests However, according to the doc (https://docs.aws.amazon.com/fr_fr/elasticloadbalancing/latest/application/sticky-sessions.html), you can rename that cookie to avoid collision So, in our design, nothing prevent us from using a couple of ALB This is also the cleanest option .. maybe A will work, but come on, creating a CLB, changing application code to create a specific cookie .. ? That is an aweful solution TLDR: answer B
upvoted 7 times
sapien45
3 years, 2 months ago
I agree, really, recommending to use a CLB when every single AWS document recommends to get away from it ? B, clear and simple
upvoted 2 times
...
...
hello_aws
Most Recent 2 years, 9 months ago
Selected Answer: A
A, agree with droop72
upvoted 1 times
...
NSF2
3 years, 6 months ago
I would go for B “If you are using multiple layers of Application Load Balancers, you can enable sticky sessions across all layers with application-based cookies. However, with duration-based cookies, you can enable sticky sessions only on one layer, because AWSALB is the only name available.” https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html
upvoted 4 times
...
Johnny_Green
3 years, 7 months ago
For ALB sticky sessions: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#sticky-sessions Regarding sticky sessions for Classic Load Balancer: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html Sessions for Network Load Balancer are inherently sticky due to the flow hashing algorithm used. Based on the above and the following statement: "If you are using multiple layers of Application Load Balancers, you can enable sticky sessions on one layer only, because the load balancers would use the same cookie name.", it appears that Answer D is correct.
upvoted 1 times
Johnny_Green
3 years, 7 months ago
Here is another reference that shows such combination (NLB + ALB) can leverage the benefits of both by putting an Application Load Balancer behind a Network Load Balancer. https://aws.amazon.com/blogs/networking-and-content-delivery/using-static-ip-addresses-for-application-load-balancers/
upvoted 1 times
Johnny_Green
3 years, 7 months ago
Reconsideration suggests that A is the correct answer because of the following requirements: 1) taking advantage of managed AWS services wherever possible; 2) must be able to edit the application code during the migration phase; 3) application is a traditional three-tier application.
upvoted 1 times
...
...
...
SilverT
3 years, 8 months ago
It is C for me. The question states to take advantage of managed AWS services where possible. ECS - ALB combo can be a good solution here.
upvoted 1 times
SilverT
3 years, 8 months ago
I correct myself, it is A. https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html
upvoted 1 times
...
...
jaggi
3 years, 8 months ago
B is correct
upvoted 1 times
...
yijetef290
3 years, 8 months ago
D ? WebSockets connections are inherently sticky.
upvoted 4 times
...
kvirk
3 years, 8 months ago
Ans is A.
upvoted 1 times
...
guruguru
3 years, 8 months ago
A. Because the requirement is to session sticky to the node, not a group of nodes. Hence, not target group. And for multiple layer of ALB, the sticky session can only configure on one layer. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#sticky-sessions
upvoted 3 times
...
exmjame
3 years, 8 months ago
ALB target group stickyness; https://aws.amazon.com/blogs/aws/new-application-load-balancer-simplifies-deployment-with-weighted-target-groups/
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...