igrigorik/node-spdyproxy

Proxy freeze when downloading[Qos support]

Closed this issue · 7 comments

When downloading a file or viewing a YouTube HD video, it will be impossible to open a web page as all bandwidth is consumed by the big stream.

Although the single SPDY connection is framed, but somehow the proxy server didn't handle multiple connections correctly.

"Will be" impossible as in: I tried it and that is the case, or I think it will be a problem? :)

The answer depends on your connection more so than anything, and the proxy itself shouldn't make it any worse. If the above condition is true without the proxy, it will be true with the proxy. The only thing that the proxy could do is add some notion of per stream flow control (which, incidentally, is a feature of SPDY v4), but that's a separate discussion...

@igrigorik I tried in two scenarios, it is a problem. This seems to be relevant with node's pause/resume flow control model. The proxy didn't make the connection worse, but it didn't distribute data frames correctly to multiple connections.

  1. Proxy and client both on localhost. No problem at all as the bandwidth between proxy is client is far larger than the bandwidth between proxy and web servers.
  2. Proxy in US, client in Europe. This is when the problem happens. When doing high speed download, it is impossible to open new pages anymore. One stream just occupied the whole tube.

Case 2 is a common use case for WebVPN. In this case the bandwidth of web server <-> proxy server can be much bigger than proxy server <-> client.

@chemhack hmm, interesting. I wonder if there is more we could do in the proxy to address this...

https://github.com/igrigorik/node-spdyproxy/blob/master/lib/server.js#L65 - in theory, that should already apply appropriate flow control / backpressure, but I guess that's not enough on its own.

@indutny any tips or suggestions?

What spdy version is used?

I mean, spdy/2 or spdy/3?

@indutny It is V3 according to chrome://net-internals/

Duplicate of #28.