I'm new to AWS ALB and I have set up an AWS Application Load Balancer along with ECS cluster with 2 EC2 instances. The entire architecture works fine. But later I find that the API calls from a single user are going to different targets (EC2 instances).

I'll explain my situation. I have an API to upload a file and another API to process that file. So in this case, the uploaded file goes to one server and the API for processing the file goes to another server. So it is giving the error: "NO ENT error". i.e the file for processing is not in the server. It is actually on the other server.

I got suggestions like, to save the file to S3 instead to the server. So I have to make sure, is there a way to route calls from a particular user to a single server?


You need to enable Sticky Sessions on the Application Load Balancer Target Group.

See this https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#sticky-sessions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.