Our ALB is registered with multiple target groups. Each target group is a separate web application serving a different portion of the website under the same domain.
Here's snippet from AWS docs about sticky session cookie encoding practice
When a load balancer first receives a request from a client, it routes the request to a target, generates a cookie named AWSALB that encodes information about the selected target, encrypts the cookie, and includes the cookie in the response to the client.
Here's a summary of what we are facing
When a client makes parallel requests, the session stickiness will not work because none of the requests have the AWSALB cookie yet.
When a client makes a single blocking request followed by multiple parallel requests, the stickiness will work only with the target group that served the initial blocking request. If the rest of the parallel requests are intended for other target groups, there's no stickiness here because their target-group's info is not encoded in the AWSALB cookie yet.
One solution here is to make a series of sequential requests to different urls in order to hit different target groups so that we establish stickiness with each target group. However, this is not practical because making the sequential blocking requests will slowdown the client.
I was wondering if there's a way to tell ALB to encode session-stickiness information about all target groups in a single request? In this case, the stickiness is established for all target groups so that the follow up requests are sticky among respective target groups.