Exposing gRPC as external API

773 views
Skip to first unread message

Chris Lees

unread,
Apr 7, 2023, 4:32:20 AM4/7/23
to grpc.io
I'm working on a project which anticipates exposing a gRPC endpoint to external customers. Most of the online discussion around gRPC focuses on its use for internal microservices, however, and most examples connect internal gRPC to external REST to provide the external API piece (often using a gRPC-gateway to provide this bridge).

Aside from the obvious fact that both parties would need to understand gRPC, are there other considerations I should be taking into account when thinking about an external gRPC API? Is there material online that I haven't found yet?

Thanks.

sanjay...@google.com

unread,
Apr 7, 2023, 12:19:44 PM4/7/23
to grpc.io
Google Cloud APIs are also exposed as gRPC - take a look at 

There is an API design guide at https://cloud.google.com/apis/design which also covers gRPC APIs. Hope that helps.

Chris Lees

unread,
Apr 8, 2023, 4:54:03 AM4/8/23
to grpc.io
That's really helpful - thank you. It confirms my understanding that it is certainly possible to expose gRPC externally, and I think it's very informative to see Google note so clearly that gRPC "provide better performance and usability" than their JSON equivalents.

I wonder if anyone has seen any statistics about the relative adoption of gRPC vs REST in the situation where both are exposed, and what that trend looks like over time? For example, are there any metrics that say that -- for the same API -- X% of calls are REST versus Y% for gRPC? It would be fascinating to know how quickly gRPC awareness and adoption are growing.
Reply all
Reply to author
Forward
0 new messages