Open nubela opened 8 years ago
10mb download speed is strangely slow. In my environment, it finished a lot faster. I'm interested in how you measured these numbers. http proxy case is plain Tcp and not over TLS, right? Were you using high latecy network?
No, the network is of the network in a digitalocean droplet. HTTP Proxy is plain TCP (via Squid).
The download numbers for http proxy == downloading 10mb file via squid proxy. Download numbers for SPDY == downloading 10mb file via nghttpx with the previous squid proxy.
I was using spdycat to download the file.
On Sat, Jan 2, 2016 at 10:58 AM, Tatsuhiro Tsujikawa < notifications@github.com> wrote:
10mb download speed is strangely slow. In my environment, it finished a lot faster. I'm interested in how you measured these numbers. http proxy case is plain Tcp and not over TLS, right? Were you using high latecy network?
— Reply to this email directly or view it on GitHub https://github.com/tatsuhiro-t/nghttp2/issues/467#issuecomment-168359779 .
That would be a product of flow control. Have you tried chrome or Firefox to download that file? They use larger flow control window size.
@nubela I think you can use nghttp instead of spdycat and set window-bits
larger to try again.
@ayanamist There doesn't seem to be a way to specify proxy settings with nghttp
, unlike spdycat:
-p, --proxy=<HOST> Use this host as a SPDY proxy
-P, --proxy-port=<PORT>
Use this as the port of the SPDY proxy if
one is set
@tatsuhiro-t I'm trying to build an integration tests (via CLI), which is why I'm using CLI tools. Is there a way to increase flow control window size in spdycat? Or alternatives for that? Or can I use Chrome/Firefox to replicate spdycat via CLI?
spdycat has -w option to change stream-level flow control window size, but it lacks a flag to change connection-level window size, so we cannot disable flow control here.
nghttp has no proxy related options. You can workaround it by rewriting some header fields. For example, to get http://example.com via h2 proxy operated on localhost:3000:
$ nghttp -H ':authority: example.com' -H ':scheme: http' https://localhost:3000/
Note that nghttp only support h2, and does not support spdy.
I'm running nghttpx w/ the following command
However, the downloads and even normal requests become significantly slower under testing:
Slow connections via requests
If you look at the first 3 tests, this simple tests merely download a small html file and then closes it. With both proxy and non-proxy (first 2 tests), it takes an average of 0.18s to complete the request.
But with nghttpx, it is 0.38s.
Slow download speed
If you look at the download speed in the last 3 tests:
(control) download speed (10mb) --> Download 10mb file without any proxy (http) download speed (10mb) --> Download 10mb file WITH http proxy (spdy) download speed (10mb) --> Download 10mb file WITH nghttpx (spdy) proxy via a proxy backend
You can see a huge difference of 6-10x slower download speed in downloading a 10mb file.
How can I improve these stats?