spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

GRPC Gateway

Open spencergibb opened this issue 9 years ago • 29 comments

I loved the workflow described https://spatialos.improbable.io/games/grpc-web-moving-past-restjson-towards-type-safe-web-apis

spencergibb avatar May 09 '17 02:05 spencergibb

This is really the future

okjesse avatar Feb 08 '18 02:02 okjesse

Sounds like a great future improvement!

evenh avatar Mar 02 '18 08:03 evenh

Is there any plans for supporting gRPC?

evenh avatar May 02 '18 07:05 evenh

@spencergibb updated url: https://improbable.io/games/blog/grpc-web-moving-past-restjson-towards-type-safe-web-apis

n0mer avatar Jul 12 '18 15:07 n0mer

I think the only thing that is needed to use gRPC with Spring Cloud Gateway is HTTP2 support #7.

MilgoTest avatar Jun 04 '19 14:06 MilgoTest

Any updates?

aosorio1 avatar Sep 04 '19 01:09 aosorio1

No, when there are updates you will see them here.

spencergibb avatar Sep 04 '19 01:09 spencergibb

It's the future.

Alexcn avatar May 09 '20 09:05 Alexcn

Hello! any news?

aikob avatar Dec 07 '20 09:12 aikob

No

spencergibb avatar Dec 07 '20 10:12 spencergibb

Any news on this? I'm currently using gRPC between all the server-side microservices, as well as a Typescript React app using grpc-web. I am able to have an envoy proxy sit between those microservices and the UI and everything works fine.

However, the only problem here is that the envoy proxy is just proxying straight to a service, but I need it to go through an API Gateway too (for things like filters and authentication) - like Zuul or Spring Cloud Gateway. My guess is that I cannot do this with Zuul because it doesn't support HTTP/2.

Does Spring Cloud Gateway support this and if so, what version do I need to get it working? Thanks.

PS Could anybody recommend another API Gateway that supports this

BenNeighbour avatar Dec 31 '20 20:12 BenNeighbour

https://github.com/spring-cloud/spring-cloud-gateway/issues/40#issuecomment-527706042

spencergibb avatar Dec 31 '20 20:12 spencergibb

@spencergibb Are there any solutions or workarounds to my problem that you are aware of?

BenNeighbour avatar Dec 31 '20 20:12 BenNeighbour

No

spencergibb avatar Dec 31 '20 20:12 spencergibb

Oh okay - but thanks anyway - if I find any workarounds then I'll post them here

BenNeighbour avatar Dec 31 '20 20:12 BenNeighbour

Hey all, I've come up with a potential solution regarding API Gateways in use with gRPC. What I am doing now, is using an NGINX Proxy - which has special filters on it to authenticate as an OAuth 2.0 Client itself, or authenticating with your own custom "Authentication Microservice".

Please note if you are gonna use NGINX, then you'll have to use some form of SSL between the Proxy and the Proxyied Services because HTTP/2 requires SSL to work properly (or so I've read...). Because NGINX is quite a good proxy it enables you to do other good things like set custom headers, rate-limits, D-DOS protection, and more.

An article about use with gRPC and HTTP/2 is here https://www.nginx.com/blog/nginx-1-13-10-grpc/

Also, you can read up about some Authentication & Authorization features in this article https://www.nginx.com/blog/validating-oauth-2-0-access-tokens-nginx/

Also, another thing to add - this is even better when this is all in a Kubernetes Cluster, as you can just reference the already load-balanced hostname for each Spring Cloud service instead of hardcoding it in different environments

BenNeighbour avatar Jan 05 '21 07:01 BenNeighbour

@BenNeighbour great solution actually

tobq avatar Jan 20 '21 13:01 tobq

hopefully, spring cloud gateway support gRPC

yinghuzhu avatar Feb 24 '21 02:02 yinghuzhu

@spencergibb Is there any news about grpc gateway?

shiziwen avatar Mar 16 '21 07:03 shiziwen

https://github.com/spring-cloud/spring-cloud-gateway/issues/40#issuecomment-527706042

spencergibb avatar Mar 16 '21 13:03 spencergibb