Live data from Hacker News

gRPC: Internet-scale RPC framework is now 1.0

cloudplatform.googleblog.com

51–60 of 111 posts

Re: gRPC: Internet-scale RPC framework is now 1.0

#51
post #25

Something I've wondered for awhile: why would I want to design with gRPC rather than well-defined HTTP/JSON endpoints? Is it just a perf thing?

Because gRPC is typed, and basically allows you to generate wrappers for objects and service clients in most major languages that play nicely

Re: gRPC: Internet-scale RPC framework is now 1.0

#52
post #26

Earlier quoted context omitted.

We're using grpc-java in production for some of our based backend system, slowly replacing our old netty/jackson based system using JSON over HTTP/1.1. The performance is good, and it's nice to have proto files with messages and services, which acts both as documentation and a way to generate client and server code. Protobuf is much faster, produces less garbage and is easier to work with than JSON/jackson. The gener…

> This turned out to be caused by HTTP/2.0 which only allows 1 billion streams over a single connection. Hilarious. People called this issue out as an obvious flaw when HTTP/2.0 was first proposed, got ignored, and here the issue is. For those unfamiliar: HTTP/2.0 uses an unsigned 31-bit integer to identity individual streams over a connection. Server-initiated streams must use even identifiers. Client-initiated stre…

It was not ignored, it was very much made on purpose because of a certain popular programming language not having unsigned 32 bit variables...

Re: gRPC: Internet-scale RPC framework is now 1.0

#53
post #26

Earlier quoted context omitted.

We're using grpc-java in production for some of our based backend system, slowly replacing our old netty/jackson based system using JSON over HTTP/1.1. The performance is good, and it's nice to have proto files with messages and services, which acts both as documentation and a way to generate client and server code. Protobuf is much faster, produces less garbage and is easier to work with than JSON/jackson. The gener…

> This turned out to be caused by HTTP/2.0 which only allows 1 billion streams over a single connection. Hilarious. People called this issue out as an obvious flaw when HTTP/2.0 was first proposed, got ignored, and here the issue is. For those unfamiliar: HTTP/2.0 uses an unsigned 31-bit integer to identity individual streams over a connection. Server-initiated streams must use even identifiers. Client-initiated stre…

So, that's the other side of the argument? I assume there was at least a reason they specced it this way originally, even if under comparison those reasons wouldn't have held up. Was there any justification, or was it literally ignored?

Re: gRPC: Internet-scale RPC framework is now 1.0

#54
post #52

Earlier quoted context omitted.

> This turned out to be caused by HTTP/2.0 which only allows 1 billion streams over a single connection. Hilarious. People called this issue out as an obvious flaw when HTTP/2.0 was first proposed, got ignored, and here the issue is. For those unfamiliar: HTTP/2.0 uses an unsigned 31-bit integer to identity individual streams over a connection. Server-initiated streams must use even identifiers. Client-initiated stre…

It was not ignored, it was very much made on purpose because of a certain popular programming language not having unsigned 32 bit variables...

Well, that's half of the downside presented, the other half is that it's split be server/client connections. I assume this was done because it simplifies the tracking of the next stream identifier, because you can just keep a counter and increment, rather than a table of used streams to check a new random identifier against?

Re: gRPC: Internet-scale RPC framework is now 1.0

#55
post #14
post #4

Anyone here who tried out gRPC or is using it in production, and can share some experiences?

docker recently adopted it for its new docker swarm feature.

We used it before, for containerd to docker communication.

Re: gRPC: Internet-scale RPC framework is now 1.0

#56
post #25

Something I've wondered for awhile: why would I want to design with gRPC rather than well-defined HTTP/JSON endpoints? Is it just a perf thing?

Primarily performance, HTTP HOL[1] kills latencies and wastes a lot of resources, especially with micro services spanning requests recursively to multiple services.

We have had to force keep alive and even forcefully turn it off in some cases :(.

[1]https://en.wikipedia.org/wiki/Head-of-line_blocking

Re: gRPC: Internet-scale RPC framework is now 1.0

#57
post #54
post #52

Earlier quoted context omitted.

It was not ignored, it was very much made on purpose because of a certain popular programming language not having unsigned 32 bit variables...

Well, that's half of the downside presented, the other half is that it's split be server/client connections. I assume this was done because it simplifies the tracking of the next stream identifier, because you can just keep a counter and increment, rather than a table of used streams to check a new random identifier against?

Correct, something that was used already in SPDY and proved to be very handy and convenient so it was kept in HTTP/2.

Re: gRPC: Internet-scale RPC framework is now 1.0

#58
post #52

Earlier quoted context omitted.

> This turned out to be caused by HTTP/2.0 which only allows 1 billion streams over a single connection. Hilarious. People called this issue out as an obvious flaw when HTTP/2.0 was first proposed, got ignored, and here the issue is. For those unfamiliar: HTTP/2.0 uses an unsigned 31-bit integer to identity individual streams over a connection. Server-initiated streams must use even identifiers. Client-initiated stre…

It was not ignored, it was very much made on purpose because of a certain popular programming language not having unsigned 32 bit variables...

BTW, recent data shows that Firefox does (on median) about 8 requests per HTTP/2 connection, up from slightly more than 1 on HTTP/1.1

So, if we ever close a connection from having reached a billion streams we are in a very very good position.

Re: gRPC: Internet-scale RPC framework is now 1.0

#60
post #4

Anyone here who tried out gRPC or is using it in production, and can share some experiences?

I've used it. It's easy to use and very capable. My favourite feature is that it supports streaming objects, in both directions. In other words you can do an RPC call where the input and/or output is an asynchronous stream of objects.

Every RPC system needs this, or you end up with hacks like HTTP long polling.

My least favourite feature is that it is tied to HTTP2. I'm not sure what you're supposed to do if you are running on a microcontroller.

Post reply on HN