Re:GRPC: A high performance, open source, general RPC framework
by a11r on Thursday February 26, 2015 @06:59PM
(#9116405)
gRPC uses the following features from HTTP/2: Framing (needed to multiplex different RPCs on the same TCP connection), Flow Control (both intra-stream and connection-wide), HPAC (for compressing metadata that tends to be common across requests), and GoAway (to gracefully drain backends).
Re:GRPC: A high performance, open source, general RPC framework
by cespare on Thursday February 26, 2015 @09:27PM
(#9116846)
Thanks! This is a good list.
Re:GRPC: A high performance, open source, general RPC framework
by dsymonds on Thursday February 26, 2015 @08:32PM
(#9116690)
Streaming RPCs in both directions (client to server, and server to client) is one big feature. It's not really possible to do client-side streaming with HTTP/1.1, especially if you have proxies in the way. Independently framed messages make it a lot more feasible to implement other important RPC features like flow control too.
Re:GRPC: A high performance, open source, general RPC framework
by cespare on Thursday February 26, 2015 @09:27PM
(#9116845)
Yeah, it's certainly more compelling than trying to build on HTTP 1.1. The alternative I had in mind was not using HTTP, though (for instance building some custom framed protocol on TCP, or open-sourcing some version of whatever Google uses internally for protobuf RPC.)
a11r pointed out several interesting features of HTTP/2 that are put to good use in gRPC, though.
Re:GRPC: A high performance, open source, general RPC framework
by dsymonds on Thursday February 26, 2015 @09:42PM
(#9116890)
gRPC is based on the internal Stubby RPC system, and that works over HTTP/1.1 based on CONNECT and switching to raw TCP. That works well enough, but the HTTP/2 goodies are too good to pass up.
In the past I've found HTTP (1.1) to be okay, but not great for server->server RPC. The semantics are fine (but overkill) and the overhead sort of sucks. With HTTP/2 I guess the performance should be a lot better (with a binary protocol); I'm still unsure about the HTTP semantics in a general RPC context. Anyone with deeper knowledge of HTTP/2 care to enlighten me?
(Following up on a twitter conversation I had with @bradfitz: https://twitter.com/calebspare/status/571049339541270529)