amazon-web-services - 网页资源请求在 Chrome 中停滞了将近一分钟

标签 amazon-web-services google-chrome http

我的网络应用程序上的资源在长时间停顿后需要将近一分钟才能加载。这种情况一直发生。如下所示,该页面上只有 3 个请求实际命中了服务器本身,其余的请求命中了内存或磁盘缓存。此问题似乎只发生在 Chrome 上,Safari 和 Firefox 都没有出现此行为。

我已经在这个 SO 问题中实现了 Cache-Control: no-store 建议,但问题仍然存在。 request stalled for a long time occasionally in chrome

下面还包括一​​个示例,说明响应最终出现后的样子。

我的应用程序托管在网络负载均衡器后面的 AWS 中,该负载均衡器代理运行 nginx 的 EC2 实例和应用程序本身。

知道是什么原因造成的吗?

Network tab Response

最佳答案

我遇到了完全相同的问题。我们将 Elastic Beanstalk 与网络负载均衡器 (NLB) 结合使用,并在 NLB 处终止 TLS。

我从 AWS Support 得到的反馈是:

This problem can occur when a client connects to a TLS listener on a Network Load Balancer and does not send data immediately after completing the TLS handshake. The root cause is an edge case in the handling of new connections. Note that this only occurs if the Target Group for the TLS listener is configured to use the TCP protocol without Proxy Protocol v2 enabled

他们现在正在努力解决这个问题。 不知何故,只有在使用 Chrome 浏览器时才会注意到此问题。

与此同时,您有以下 2 个选项作为解决方法:

  • 在目标组上启用代理协议(protocol) v2 或
  • 将目标组配置为使用 TLS 协议(protocol)将流量路由到目标

关于amazon-web-services - 网页资源请求在 Chrome 中停滞了将近一分钟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55313155/

相关文章:

java - : "Uploading function code to Lambda" javax/xml/bind/JAXBException 期间发生内部错误

Android 应用 https 深度链接和 Chrome 浏览器

python - 在 python http.client.HTTPSConnection 中设置更新的 ssl 版本

node.js - AWS Lambda Nodejs环境要求不一致

amazon-web-services - 云信息 : AmazonEC2; Status Code: 400; Error Code: Unsupported

string - AWS Cloudformation 属性 SubnetIds 的值必须为字符串列表类型

javascript - chrome浏览器如何调用父窗口函数?

javascript - 显示未捕获的 TypeError : e. target.setCapture 不是 chrome 中的函数

node.js - Angular 2 向 Node/Express 服务器端点发送请求

python - TypeError:不是有效的非字符串序列或映射对象