4 ms·
> Rather than using the Go standard library's net/http, grpc-go uses its own implementation of HTTP/2. It's incompatible with the rest of Go's HTTP ecosystem, s
by steeve 4y ago
> Rather than using the Go standard library's net/http, grpc-go uses its own implementation of HTTP/2. It's incompatible with the rest of Go's HTTP ecosystem, so you can't cleanly serve gRPC requests alongside other HTTP traffic and can't use most third-party packages.
Mostly because grpc-go's implementation is about 5-10x faster than net/http.
- nhoughto 4y agoGood stat, anymore detail? Love to read more into why
- pvillano 4y agoinvoking Cunningham Maybe it follows the spec completely and defensively, requiring many more checks and supporting typically unused behavior
- avg_dev 4y agoI'm curious how the performance of the two (grpc-go and connect) compare in benchmarks in terms of memory usage and so on. I know there is fasthttp in Go which sometimes people use as an alternative to net/http for performance sensitive code. https://www.sobyte.net/post/2022-03/nethttp-vs-fasthttp/ https://www.sobyte.net/post/2022-03/nethttp-vs-fasthttp/ I also presume there are some reduction in bugs simply by reducing the LoC in this project compared to grpc-go.