AWS Certified SysOps Administrator – Associate (legacy) — Question 357
A sys admin is trying to understand the sticky session algorithm. Please select the correct sequence of steps, both when the cookie is present and when it is not, to help the admin understand the implementation of the sticky session:
1. ELB inserts the cookie in the response
2. ELB chooses the instance based on the load balancing algorithm
3. Check the cookie in the service request
4. The cookie is found in the request
5. The cookie is not found in the request
Answer options
- A. 3,1,4,2 [Cookie is not Present] & 3,1,5,2 [Cookie is Present]
- B. 3,4,1,2 [Cookie is not Present] & 3,5,1,2 [Cookie is Present]
- C. 3,5,2,1 [Cookie is not Present] & 3,4,2,1 [Cookie is Present]
- D. 3,2,5,4 [Cookie is not Present] & 3,2,4,5 [Cookie is Present]
Correct answer: C
Explanation
When a cookie is not present, the ELB first checks the request (3), discovers it is missing (5), selects an target instance using the load balancing algorithm (2), and inserts the sticky session cookie into the response (1). If the cookie is present, the ELB checks the request (3), finds the cookie (4), routes the connection to the specified sticky instance (2), and includes the cookie in the response (1). Other options are incorrect because they outline logical sequencing errors, such as inserting a cookie before choosing the target instance or failing to detect the cookie's presence first.