armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Add gRPC reverse proxy server example

Open trustin opened this issue 5 years ago • 8 comments

.. which is similar to our HTTP reverse proxy server example.

trustin avatar Dec 30 '19 15:12 trustin

@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.

anuraaga avatar Jan 02 '20 08:01 anuraaga

It was originally requested in https://line-armeria.slack.com/archives/C1NGPBUH2/p1577719334033400

ikhoon avatar Jan 02 '20 08:01 ikhoon

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

anuraaga avatar Jan 02 '20 08:01 anuraaga

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 avatar Sep 08 '21 06:09 antongocode

@antongocode You might want to see https://github.com/line/armeria-examples/blob/master/proxy-server/src/main/java/example/armeria/proxy/ProxyService.java

ikhoon avatar Sep 08 '21 13:09 ikhoon

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.

roeniss avatar Apr 03 '22 08:04 roeniss

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.

jrhee17 avatar Apr 04 '22 06:04 jrhee17

I'll try it, thank you for the advice @jrhee17

roeniss avatar Apr 07 '22 16:04 roeniss

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

roeniss avatar Mar 16 '23 16:03 roeniss

I'll create a PR for this issue until this weekend 🙂

Bue-von-hon avatar Jul 06 '23 14:07 Bue-von-hon