How can I use nginx 1.9.5 as reverse proxy with gRPC?

762 views
Skip to first unread message

igzh...@gmail.com

unread,
Feb 16, 2017, 3:30:12 AM2/16/17
to grpc.io

Thanks guys, It's very pleasure to join this group.


I want to write my backend code with Java, and my reverse proxy engine is NGINX 1.11.9(which has been supported HTTP/2), I saw the gRPC PHP has been adapted with NGINX with the doc:  https://github.com/grpc/grpc/tree/master/src/php#use-the-grpc-php-extension-with-nginxphp-fpm


But no doc for any other repo, such as gRPC Java even some relates tips.


So I was searching for it, but further searching, more confuse, because gRPC PHP is worked with NGINX, in theory, gRPC can work too, isn't it? But I also saw there is an issue said it is in the process of submitting a 3rd party module in nginx for grpc support without update, and there is a ticket on NGINX means we can't write HTTP/2 NGINX proxy module for gRPC, and also saw nginx does not support the full HTTP/2 specs, gRPC does not work through it


Thanks!

Stanley Cheung

unread,
Feb 16, 2017, 3:41:58 AM2/16/17
to igzh...@gmail.com, grpc.io
The PHP use case is as follows:
  • Your frontend client (e.g. browser, mobile) is hitting your Nginx reverse proxy
  • Perhaps that's a PHP script that the user is requesting. Nginx is launching a fastcgi process to run your PHP script.
  • This PHP script can be used as a gRPC client itself, to communicate further with a gRPC backend server that could have been implemented in any language.
Hope that helps.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8d6ecd6e-1f55-43c0-85da-bdee64237d02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacks Gong

unread,
Feb 16, 2017, 7:02:17 AM2/16/17
to grpc.io, igzh...@gmail.com
Okay, , Thanks.


On Thursday, February 16, 2017 at 4:41:58 PM UTC+8, Stanley Cheung wrote:
The PHP use case is as follows:
  • Your frontend client (e.g. browser, mobile) is hitting your Nginx reverse proxy
  • Perhaps that's a PHP script that the user is requesting. Nginx is launching a fastcgi process to run your PHP script.
  • This PHP script can be used as a gRPC client itself, to communicate further with a gRPC backend server that could have been implemented in any language.
Hope that helps.
On Thu, Feb 16, 2017 at 12:30 AM, <igzh...@gmail.com> wrote:

Thanks guys, It's very pleasure to join this group.


I want to write my backend code with Java, and my reverse proxy engine is NGINX 1.11.9(which has been supported HTTP/2), I saw the gRPC PHP has been adapted with NGINX with the doc:  https://github.com/grpc/grpc/tree/master/src/php#use-the-grpc-php-extension-with-nginxphp-fpm


But no doc for any other repo, such as gRPC Java even some relates tips.


So I was searching for it, but further searching, more confuse, because gRPC PHP is worked with NGINX, in theory, gRPC can work too, isn't it? But I also saw there is an issue said it is in the process of submitting a 3rd party module in nginx for grpc support without update, and there is a ticket on NGINX means we can't write HTTP/2 NGINX proxy module for gRPC, and also saw nginx does not support the full HTTP/2 specs, gRPC does not work through it


Thanks!

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages