valyala / fasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
MIT License
21.83k stars 1.76k forks source link

HTTP/2 support #144

Open liclac opened 8 years ago

liclac commented 8 years ago

Is this planned at all? And if I was interested in implementing it myself, where would I start?

erikdubbelboer commented 1 year ago

There is currently no plans to include HTTP/2 support into fasthttp. I myself would only like to add support if I was going to use http2 myself, otherwise it's too hard and time consuming to work on. Pull requests on either repo are always welcome of course.

bryanvaz commented 1 year ago

Agree with both of you, Erik and Darío. Basically no HTTP/2 support is actively being built for fasthttp and no plans to support it in the future.

If any downstream project needs HTTP/2, it should not expect one from fasthttp. Instead it should implement HTTP/2 on its own, either by forking fasthttp and adding HTTP/2 support, or by building a separate extension to add HTTP/2.

phuslu commented 1 year ago

agree. I used to use fasthttp for rtb, and I realized we only need a http2 client rather than a http2 framework.

So I ripped a http2 implementation from grpc-go but haven't to verify it yet.

daenney commented 11 months ago

And... on top of that, who is going to use http/2 without GRPC support?

fasthttp is used by plenty of frameworks that aren't limited to computer-to-computer communication. Roughly 35-40% of the web properties use HTTP/2. You're using HTTP/2 fairly regularly without gRPC support.

That's not necessarily a reason for a fasthttp HTTP/2 implementation to be developed, but it definitely doesn't have to come with support for gRPC to be useful. JSON-over-HTTP works just as well for HTTP/2 and you'd still benefit from the improvements to the wire format like multiplexing and the HPACK header compression.

lesismal commented 11 months ago

JSON-over-HTTP works just as well for HTTP/2 and you'd still benefit from the improvements to the wire format like multiplexing and the HPACK header compression.

Websocket can handle that too.

dgrr commented 11 months ago

@daenney Sure, I agree with you that it does have usages, but I don't even use Golang anymore (not only fasthttp but Go at all), so it doesn't make sense that I try to implement it because it would divert my focus from my current job. Also, I would not be able to test it in a daily basis because I wouldn't be using it, therefore I would have to wait for people to report bugs, etc... I don't wanna sell a product that I wouldn't even buy.

apuatcfbd commented 8 months ago

PLEASE MENTION IT IN THE README! that this lib doesn't support http2

cipriancraciun commented 8 months ago

PLEASE MENTION IT IN THE README! that this lib doesn't support http2

@apuatcfbd you mean like this snippet that already exists in the README: https://github.com/valyala/fasthttp/blob/5f81476d7cf339624b5fec57a06ee96d3e27d9c2/README.md?plain=1#L577-L581