[英]AWS Application Load Balancing: Seeing extremely long initial connection time
From observer's perspective, symptoms are identical to the issue here Scenario is the same as well: Angular app which sends preflight requests to REST api, and preflight requests take in roughly 50% of times up to 1.3 seconds (illustration is the same as in the linked question).从观察者的角度来看,症状与这里的问题相同 场景也相同: Angular 应用程序将预检请求发送到 REST api,预检请求大约花费了 50% 的时间,最多 1.3 秒(插图与链接问题)。
Also, websocket was frequently timing out until socket.io finally succeeded in establishing connection.另外,websocket经常超时,直到socket.io终于成功建立连接。 Problem was more pronounced in Chrome and less in Safari/Firefox.问题在 Chrome 中更为明显,而在 Safari/Firefox 中则较少。
However, we are using ALB and not ELB, and all our su.nets are public.但是,我们使用的是 ALB 而不是 ELB,并且我们所有的 su.net 都是公开的。
Solution we found working was that all subnets needed to go through same internet gateway - same route table was applied to all subnets. 我们发现有效的解决方案是所有子网都需要通过相同的Internet网关-相同的路由表已应用于所有子网。
When that was done, all requests started going through faster and websocket connects immediately without reconnecting. 完成后,所有请求开始更快地通过,websocket立即连接而无需重新连接。
Had a similiar issue. 有类似的问题。 The LB has to be set up to use at least 2 availability zones. LB必须设置为至少使用2个可用区。 You have to select which subnetwork in each AZ it should use. 您必须选择每个可用区中的哪个子网。 In my case, one of the networks had bad ACL settings that basically denied all traffic. 以我为例,其中一个网络的ACL设置错误,基本上拒绝了所有流量。 This would mean that the service would seem to go down for a minute or so whenever DNS decided to give you the IP address of the non-functioning LB interface. 这意味着,每当DNS决定为您提供无法正常工作的LB接口的IP地址时,该服务似乎就会停顿一分钟左右。 It would then start working again after the DNS cache expired and you got the IP for the functioning interface. 在DNS缓存过期并且您获得了正常运行的接口的IP之后,它将重新开始工作。
We also have been facing the same problem, and we found out that we had one public su.net in one zone and private su.net in other zone of the ALB.我们也一直面临同样的问题,我们发现我们在 ALB 的一个区域中有一个公共 su.net,而在另一个区域中有一个私有 su.net。 We fixed it by selecting public su.net in both availability zone.我们通过在两个可用区中选择 public su.net 来修复它。 In general for public facing ALBs all the su.nets should be a public su.net though traffic where you are redirecting (EC2, lambda) could be in private su.net as well.一般来说,对于面向公众的 ALB,所有 su.net 都应该是公共 su.net,尽管您重定向的流量(EC2、lambda)也可能位于私有 su.net 中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.