How to use nginx 1.9.5 as a reverse proxy with gRPC?

I want to

  • write my internal code using Java,
  • use HTTP / 2 (NGINX 1.9.5 supported by HTTP / 2)
  • write a bidirectional stream to send data between the client and server at any time.

gRPC seems like the best choice, and I want to use NGINX as my reverse proxy and load balancing, I could not find any documentation to figure out how to use NGINX with gRPC Java, does anyone know?


I have seen that gRPC PHP already supports NGINX: https://github.com/grpc/grpc/tree/master/src/php#use-the-grpc-php-extension-with-nginxphp-fpm

But I also saw that the problem says that it is in the process of sending a third-party module to NGINX to support gRPC and there is a ticket to NGINX which means we cannot write the HTTP / 2 NGINX proxy module for gRPC, and I also did not see nginx supports full HTTP / 2 specifications, gRPC does not work through it

I got confused about this, why some posts say that PHP gRPC works, but in other posts it says it can't.

+5
source share
1 answer

Not on nginx, but I just published grpc-proxy written in Go. It is lightweight and customizable, and there is an image of dockers .

+4
source

Source: https://habr.com/ru/post/1264239/


All Articles