大网数据广告活动
服务器运维问答

AWS Application Load Balancer Duplicate Requests

· 52CE 我爱测

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 causi…

问题原文

原帖链接 · AliK · CC BY-SA 4.0

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.

社区高分解答

原帖链接 · MLu · CC BY-SA 4.0

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 :)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。