Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRPC Gateway #40

Closed
spencergibb opened this issue May 9, 2017 · 29 comments · Fixed by #2388
Closed

GRPC Gateway #40

spencergibb opened this issue May 9, 2017 · 29 comments · Fixed by #2388
Projects
Milestone

Comments

@spencergibb
Copy link
Member

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

@okjesse
Copy link

okjesse commented Feb 8, 2018

This is really the future

@evenh
Copy link

evenh commented Mar 2, 2018

Sounds like a great future improvement!

@evenh
Copy link

evenh commented May 2, 2018

Is there any plans for supporting gRPC?

@n0mer
Copy link

n0mer commented Jul 12, 2018

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

@MilgoTest
Copy link

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

@aosorio1

This comment has been minimized.

@spencergibb
Copy link
Member Author

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

@Alexcn

This comment has been minimized.

@aikob

This comment has been minimized.

@spencergibb

This comment has been minimized.

@BenNeighbour
Copy link

BenNeighbour commented Dec 31, 2020

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

@spencergibb
Copy link
Member Author

#40 (comment)

@BenNeighbour
Copy link

BenNeighbour commented Dec 31, 2020

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

@spencergibb
Copy link
Member Author

No

@BenNeighbour
Copy link

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

@BenNeighbour
Copy link

BenNeighbour commented Jan 5, 2021

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

@tobq
Copy link

tobq commented Jan 20, 2021

@BenNeighbour great solution actually

@yinghuzhu
Copy link

hopefully, spring cloud gateway support gRPC

@shiziwen
Copy link

@spencergibb Is there any news about grpc gateway?

@spencergibb
Copy link
Member Author

#40 (comment)

@tinder-vijayvangapandu
Copy link

@spencergibb is it something prioritized? please let us know, if not we need to find workaround or alternatives.

@spencergibb
Copy link
Member Author

This is blocked by #7

@csterwa
Copy link

csterwa commented Aug 11, 2021

When #7 is implemented do we see this just working or will there be additional work to make gRPC work via HTTP/2 on SCG?

@aalansehaiyang
Copy link

awaiting good news

@spencergibb spencergibb added this to To do in 2021.0.0-M3 via automation Oct 13, 2021
@spencergibb spencergibb added this to the 3.1.0-M3 milestone Oct 13, 2021
@spencergibb spencergibb linked a pull request Oct 13, 2021 that will close this issue
2021.0.0-M3 automation moved this from To do to Done Oct 13, 2021
spencergibb pushed a commit that referenced this issue Oct 13, 2021
Passing TE trailers header through

Adding grpc-status as response trailer to ensure the right end of stream

Fixes gh-40
@gm100861
Copy link

hello, any good news ?

@spencergibb
Copy link
Member Author

If you look at the history, this was added in 2021.0.0

@trajano
Copy link
Contributor

trajano commented Oct 13, 2022

I don't see any mention about it in the documentation except for spring.cloud.gateway.filter.json-to-grpc.enabled

I did build my own implementation for an experiment

@Albertoimpl
Copy link
Member

Hey @trajano gRPC support was added a while ago: https://spring.io/blog/2021/12/08/spring-cloud-gateway-and-grpc
Recently, we included a filter to translate from JSON automatically: https://docs.spring.io/spring-cloud-gateway/docs/4.0.0-M5/reference/html/#the-jsontogrpc-gatewayfilter-factory
Let me know if you have any feedback.

@trajano
Copy link
Contributor

trajano commented Oct 17, 2022

I know it's added a while ago, my comment was that there is no mention of it in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2021.0.0-M3
  
Done
Development

Successfully merging a pull request may close this issue.