armeria
armeria copied to clipboard
Add gRPC reverse proxy server example
.. which is similar to our HTTP reverse proxy server example.
@trustin Could you define more what a gRPC reverse proxy is? Would it just be a normal service implementation that delegates to another stub? In general, I make reverse proxies for gRPC services by using a normal HTTP reverse proxy since it's not dependent on the stub's definition.
It was originally requested in https://line-armeria.slack.com/archives/C1NGPBUH2/p1577719334033400
Thanks for the link! It does look like the original request was just for a normal HTTP proxy so maybe we already have the example, or it could be extended with rule matching.
For reference, here's an Armeria reverse proxy that allows simple path-based routing (perfect for gRPC) - https://github.com/curioswitch/curiostack/tree/master/gateway/server
Apologies for commenting on a fairly old ticket, but where can I find the HTTP reverse proxy examples for armeria? This ticket is the top search result.
@antongocode You might want to see https://github.com/line/armeria-examples/blob/master/proxy-server/src/main/java/example/armeria/proxy/ProxyService.java
Is there any work left to be done on this issue? As anuraaga said it's not obvious what reverse proxy for gprc is compared to normal one. To be more specific, I wonder why this issue got good first issue
tag later.
I'm not sure what the original request was as the slack post seems to have expired.
Having said this, I think it could be meaningful if we can add an example of a grpc-gateway
type reverse-proxy implementation using armeria
's grpc-json transcoding features.
I'll try it, thank you for the advice @jrhee17
After half a year, I realize that I don't want to resolve this issue. Sorry for others who wanted to take this issue for such a delayed decision
I'll create a PR for this issue until this weekend 🙂