AWS Application Load Balancer Duplicate Requests

amazon-web-servicesload balancing

Has anyone experienced duplicate requests sent to multiple EC2 instances using application load balancer?

We have an API on EC2 fronted by ALB and recently noticed that some requests are being sent to multiple instances and causing an issue as certain actions like payments are happening more than once.

The API is built around .net core, but don't think this is important. The issue started recently and it does not happen all the time.

Has anyone seen something like this. I have seen some older issues from around 2011/2012 but nothing more recent.

Best Answer

Enable ALB access logs (they are delivered to S3) and analyse them.

More likely then not you'll find that it's actually your clients sending the request multiple times - either through user interaction (e.g. user reloads the page while waiting for the payment processing) or caused by your client side app (JS times out waiting for a response and re-sends the request). The logs will tell you.

Hope that helps :)

Related Topic