HTTP/2 support
It would be nice to see tornado implement http/2, not that AFAIK it's a standard.
Need to wait a bit till that standard become stable. Right?
The standard isn't finalized, but it's close enough to work with. I have some work in progress at https://github.com/bdarnell/tornado_http2. It's in decent shape but it doesn't support flow control yet so it only works for small requests and responses.
thats awesome!
@bdarnell that's great. do you need help with specific things? I don't know the standard too well but I've skimmed over it and I know the general idea.
Not really. The last thing left is flow control but it doesn't really lend itself to being worked on in parallel.
Thanks, good job!!
Any news here? I have read the other posts so as far as I understand it will be not done until the protocol is finalized.
Why so hurry, standard is so far from getting standardized .
On Tue, Jul 14, 2015 at 9:55 PM, Ján Sáreník [email protected] wrote:
Any news here?
— Reply to this email directly or view it on GitHub https://github.com/tornadoweb/tornado/issues/1438#issuecomment-121281269 .
The standard is finalized (https://tools.ietf.org/html/rfc7540), but I don't have anything else to report. I haven't had time to work on this recently.
Oops , i must be living under the rocks. when was that? That didn't even make much news.
On Wed, Jul 15, 2015 at 12:03 AM, Ben Darnell [email protected] wrote:
The standard is finalized (https://tools.ietf.org/html/rfc7540), but I don't have anything else to report. I haven't had time to work on this recently.
— Reply to this email directly or view it on GitHub https://github.com/tornadoweb/tornado/issues/1438#issuecomment-121317269 .
Wow, standart is finalized so it would be nice uf this feature has been implemented
Just noting that Chrome abandoned SPDY for HTTP2 and every iOS 9 application is HTTP/2 by default.
@bdarnell I noticed that https://github.com/tornadoweb/tornado/pull/525#issuecomment-118635107 references https://github.com/bdarnell/tornado_http2. Is that a full implementation and can you imagine a way to reconcile the two?
As I said before, the major piece missing from tornado_http2 is flow control. #525 implemented SPDY, not HTTP/2, which didn't have the same flow control protocol and so I don't think there's anything to reconcile there. I don't know when I'll be able to finish up flow control so if anyone would like to work on this feel free to claim it.
@bdarnell do you have a checklist of what parts of the spec have been completed vs. incomplete? I may be able to assist, but it would be useful to know what state you're in?
No, I don't have a checklist. Off the top of my head, there's flow control and prioritization, and then there's a lot of places in the spec that dictate a certain error-handling behavior that we need to go through and check.
Looks like flow control made it into the spec? https://tools.ietf.org/html/rfc7540#section-5.2
Flow control is now implemented in https://github.com/bdarnell/tornado_http2, so it's ready for more usage and testing.
I think HTTP/2 is more meaningful with connection reuse & stream multiplexing, especially with lots of API query in same origin. And I've wrote a client, requires h2==2.1.0 & tornado >= 4.0, here's the code https://github.com/mSOHU/http2
usage:
client = SimpleAsyncHTTP20Client(host='
differents:
- no follow redirections
- one connection each client, and connect once client object is built
- HTTP20Response with push_responses, new_request(for redirection)
- once connection was broken, all sent request are broken as exception HTTP2ConnectionClosed()
features:
- connect_timeout & request_timeout
- push streams
- h2 & h2c supporting
- do auto-reconnect to server
- stream multiplexing
- stream concurrency negotiating
Hello, There are any plans to merge the HTTP/2 support to tornado main branch? Thank you
I plan to merge the HTTP/2 support into Tornado eventually, but not until it's been proven successful. I haven't heard any reports from people using the tornado_http2 package (positive or negative). Are you using it? Is it working for you? What difference does it make for you whether it's in the master branch or a separate package?
I haven't try HTTP/2 yet. Busy with our own startup product on pypy + tornado + rethinkdb, actually HTTP2 is really necessary for us. So we will be testing soon.
Hi all, I've been working on a different approach on an HTTP/2 server using the hyper-h2 library, here's a quick demo.
It's not feature complete but I've managed to integrate it with the web framework allowing RequestHandler classes to respond seemlessly.
Any feedback or comments would be most welcome, and of course, thanks for the excellent work on Tornado.
@bdarnell I have recently attempted to use the tornado_http2 package but it appears the _ServerRequestAdapter is not apart of Tornado anymore so I was unable to spin it up.
I've updated tornado_http2 to work with (and probably require) tornado 4.5
Great, welcome http2
will tornado_http2 merge into tornado?
will tornado_http2 merge into tornado?
Maybe someday, but I think it only makes sense to merge http/2 into the main package after it's been proven to be usable and reliable as a separate package. Right now I've only heard from one person other than myself who's even tried tornado_http2.
Many Nodejs frameworks are resupporting HTTP2. Python community (including myself) is really slow on adopting HTTP2.
@bdarnell Hi, I achieved use of httpclient using http2 with curl, libcurl >= 7.43.0 supports multiplexed requests well, just setting up the number of max_clients =)
I suggest merge http2 into tornado as an experiemntal feature.
so we can running tornado as http/1.1 on product environment, and test http/2 on develop environment with a switch easily.
In this way, we can accelerate http/2 stable, also keep http/2 with latest tornado base. and get more feedback from community too.