简体   繁体   English

AWS Application Load Balancing:看到极长的初始连接时间

[英]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.

相关问题 使用应用程序负载平衡和 MSSQL AlwaysOn 将应用程序托管在 AWS 中 - Having Application hosted in AWS with Application Load Balancing and MSSQL AlwaysOn 具有负载平衡的 Umbraco 8 应用程序 - Umbraco 8 application with load balancing 使用 AWS Glue ETL 将镶木地板文件从 S3 加载到 AWS RDS 需要很长时间 - Loading parquet file from S3 to AWS RDS taking extremely long time using AWS Glue ETL 如何使用 Nginx/ELB/ECS 诊断与托管在 AWS 中的网页的长时间初始连接 - How do I diagnose a long Initial Connection to webpage hosted in AWS with Nginx/ELB/ECS 为有状态集副本地址启用负载平衡和连接管理 - Enable load balancing and connection management for stateful set replica address Azure Web App 和 React SSR:初始加载时加载时间极慢 - Azure Web App and React SSR: Extremely slow loading times on initial load spark.read.json() 加载数据需要很长时间 - spark.read.json() taking extremely long to load data Ingress 和 AWS 应用程序负载均衡器 - Ingress and AWS Application Load Balancer WordPress & 谷歌云平衡负载平衡 - WordPress & Load balancing on Google Cloud Balancing 为什么 pyppeteer 需要这么长时间才能在 AWS Lambda 上加载单个网页 - Why does pyppeteer take such a long time to load a single webpage on AWS Lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM