你如何判断HTTP2.0请求是否正在进行多路复用?

huangapple go评论49阅读模式
英文:

How can I tell if HTTP2.0 requests are being multiplexed?

问题

我有一个配置为使用HTTP2的nginx服务器。托管在该服务器上的一些JavaScript会让浏览器发送一系列并发的fetch()请求。我的浏览器的网络选项卡显示它们几乎同时开始,但我正在尝试确定它们是否实际使用了HTTP2的多路复用功能。检查数据包捕获是唯一的确定方法吗?谢谢!

英文:

I have an nginx server configured to use HTTP2.
Hosted on that server is some javascript that has the browser send a series of concurrent fetch() requests.
The network tab in my browser shows them all starting at roughly the same time, but I'm trying to figure out whether they're actually using the multiplexing feature of HTTP2. Is examining a packet capture the only way to determine this?

Thanks!

答案1

得分: 1

使用基于Chromium的浏览器,如Google Chrome,您可以使用其网络导出功能。

要执行此操作,请转到:

chrome://net-export/

您将收到提示以捕获网络流量。

你如何判断HTTP2.0请求是否正在进行多路复用?

一旦您获得了网络日志文件,您可以转到 https://netlog-viewer.appspot.com/ 并将文件拖放到其中以进行可视化。

在左侧单击HTTP/2,然后单击要分析的会话。在该连接中传输的所有内容都将列出。如果一切都按照您的预期运行,您将在开始看到HTTP2_SESSION_RECV_HEADERSHTTP2_SESSION_RECV_DATA之前可能会看到多个HTTP2_SESSION_SEND_HEADERS的条目。

英文:

Using a Chromium-based browser like Google Chrome, you can use its net export feature.

To do this, go to:

chrome://net-export/

You'll be prompted to capture network traffic.

你如何判断HTTP2.0请求是否正在进行多路复用?

Once you have your network log file, you can go to https://netlog-viewer.appspot.com/ and drag your file in to visualize it.

Click HTTP/2 on the left, then click a session that you want to analyze. You'll see a list of everything that went through that connection. If things are working like you expect, you'll see possibly multiple entries for HTTP2_SESSION_SEND_HEADERS before you start seeing HTTP2_SESSION_RECV_HEADERS and HTTP2_SESSION_RECV_DATA.

huangapple
  • 本文由 发表于 2023年7月3日 02:37:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76600288.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定