英文:
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/
您将收到提示以捕获网络流量。
一旦您获得了网络日志文件,您可以转到 https://netlog-viewer.appspot.com/ 并将文件拖放到其中以进行可视化。
在左侧单击HTTP/2,然后单击要分析的会话。在该连接中传输的所有内容都将列出。如果一切都按照您的预期运行,您将在开始看到HTTP2_SESSION_RECV_HEADERS
和HTTP2_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.
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
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论