Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/2 support #86

Open
robertlagrant opened this issue Feb 19, 2015 · 7 comments
Open

HTTP/2 support #86

robertlagrant opened this issue Feb 19, 2015 · 7 comments

Comments

@robertlagrant
Copy link

Just pulled from the spec readme:

At a high level, HTTP/2:

is binary, instead of textual
is fully multiplexed, instead of ordered and blocking
can therefore use one connection for parallelism
uses header compression to reduce overhead
allows servers to "push" responses proactively into client caches

Sounds awesome. Is it doable for waitress?

@xetch
Copy link

xetch commented Jan 21, 2017

👍

@digitalresistor
Copy link
Member

digitalresistor commented Feb 20, 2017

There have been a couple of requests for this, and there was some interest in doing this for GSoC.

I wanted to quickly add some notes that may be helpful in the future for someone that wants to implement HTTP/2 in waitress, as well as expectations I have for what that implementation looks like, and what I'd like to see if this were to be implemented for waitress.

  1. Waitress is a pure Python implementation, if HTTP2 is added, I would accept it as a default option if and only if it too is a pyre Python implementation. I'd prefer not to have to rely on other libraries, but if they are Python only it's not that bad, but no C code at all.
  2. There are some assumptions made in the code right now that a single HTTPChannel is associated with zero or one currently executing task (multiple requests can be queued up, and in a loop a task will be used to answer those requests). To take advantage of the fact that HTTP/2 allows multiple requests to be executed at the same time, that limitation would need to be removed. This also means that we need limitations on how many threads can be used by a single HTTP connection (a similar request is made in Need a way to limit threads per remote #88 but that is limiting how many connections a single client can make)
  3. We would want to introduce some sort of API that allows HTTP/2 push to be used. I like the idea of making it something like Cloudflare's Link support whereby it does a secondary request for the resource to be pushed.

I am sure there is more, first things first is enabling full SSL support in waitress, as well as the negotiation support being available to negotiate for HTTP2 in SSL.

@mmerickel
Copy link
Member

I would accept it as a default option if and only if it too is a pyre Python implementation.

https://python-hyper.org/h2/en/stable/ is probably the leading candidate here for a waitress dependency.

@har33sh
Copy link

har33sh commented Feb 22, 2017

We would want to introduce some sort of API that allows HTTP/2 push to be used. I like the idea of making it something like Cloudflare's Link support whereby it does a secondary request for the resource to be pushed

What is Cloudflare's Link ??

https://python-hyper.org/h2/en/stable/ is probably the leading candidate here for a waitress dependency.

I'm learning about the implementation of WSGI from
http://wsgi.readthedocs.io/en/latest/

Is it right start ?? or should I be starting by learning implementation of using h2
https://python-hyper.org/h2/en/stable/basic-usage.html#writing-your-server ??

@digitalresistor
Copy link
Member

@robertlagrant
Copy link
Author

Newer link for h2: https://github.com/python-hyper/h2

@suche-cz
Copy link

any updates on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants