httpfetchmultiplexing

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


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!


Solution

  • 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.

    chrome://net-export

    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.