Context:
We are uploading files directly to GCS from a web-interface via AJAX calls using a parallel composite upload approach.
While running tests in different scenarios we noticed that on some networks the upload speed is capped around 50Mbps even though on all of them the bandwidth is between 100Mbps and 1Gbps.
We ran gsutils perfdiag
inside one of the "troubled" networks in order to emulate the web-interface upload approach and got significantly better performances. When comparing the browser calls and gsutils
TCP connections we realised that the later is not using HTTP/2 while the browser does. That means that gsutils
is opening multiple TCP connections and sends 32 chunks in parallel.
We disabled HTTP/2 in Firefox (not possible in the later versions of Chrome) and ran the same upload requests using HTTP 1.1 (up to 6 chunks sent in parallel) and the upload speed improved significantly.
Having an application that needs high performance upload speeds we need to ensure a consistent upload speed when the network bandwidth allows it.
Questions:
- Is there any way, apart from disabling HTTP/2 support in browsers, to downgrade the GCS protocol to HTTP 1.1 (Cloud Console, certain headers etc.)?
- What are the potential network factors that degrade the HTTP/2 performance in certain cases?