-
Notifications
You must be signed in to change notification settings - Fork 381
Write a doc and sample on how to use gRPC with nginx #230
Comments
@fengli-google would you be able to help out with this? |
@fengli-google have you had a chance to look into this? |
yes, we can drop this from GA milestone. |
Please! I could use this documentation right away. Bummer that gRPC isn't further along - esp. with respect to NGINX |
This may be relevant https://trac.nginx.org/nginx/ticket/923 |
@shulegaa we are in the process of submitting a 3rd party module in nginx for grpc support. we cant control the nginx core code or timeline for http/2 support. for now, if its critical for your needs, we can point you to a custom nginx binary where we have built support for grpc.(usable for testing/prototyping). |
Do tell! Please. I'd be very interested in seeing what you've done. Depending on timing, we may go down a similar path. Long story. |
I use nginx1.10 which support http2 as grpc server proxy, then go grpc client send a request to server,
nginx can receive the connection preface starts with the string
When I use go http2 to send a http request, the nginx can response succeed. So what's difference and reason for that? Anyone helps @fengli79 @zinuga @hsaliak @shulegaa @clehene @fengli-google |
@zinuga could you please also point me to your 3rd party nginx module for grpc support? thanks |
Nginx today doesn't support HTTP2 as upstream, so you cannot use it as a L7 proxy for GRPC. Instead you can use it as a L4 proxy. For the RST_STREAM issue, it's a known regression in nginx. |
@zinuga Hi, I'm also considering grpc and nginx for my next project. Can you please kindly share the source code of that nginx module? I'm not interested in binary blobs :-) Thanks! @fengli79 BTW that NGINX RST_STREAM regression seems to be fixed. |
@zinuga could you please also point me to your 3rd party nginx module for grpc support? thanks |
Much needed feature indeed, I saw some posts on the internet talking about ngx_stream_core_module |
@zinuga same here |
I went a bit of exploring and understood it better, and created a load balancer that balance automatic using docker + consul: i'm using nghttp2 for this one, by the way |
@zinuga same here, it seems nginx supports HTTP/2 but not full. Any updates now? |
@zinuga same here, thanks.:) |
@zinuga same here (grpc/grpc#11427) thanks! |
based on this grpc/grpc#11427, it is matter of a few weeks now before its upstreamed. credit @PiotrSikora. once done, @LisaFC can help with doc on how to use. |
There are some fixes provided by @PiotrSikora in the latest versions of nginx (http://nginx.org/en/CHANGES):
Do you know if we can use gRPC with nginx now? |
@siacomuzzi unfortunately, those are only prerequisites and bugfixes for existing HTTP/2 server-side code. HTTP/2 to backends is still pending review / merge. |
Hello wangming1993, PiotrSikora Could you please share the working nginx.conf. We are seeing that our nginx h2 proxy(taken from PiotrSikora github) is not forwarding to gRPCServer. our conf file part looks below:
10.220.73.160 is the Network element, that has gRPCServer running. nginx -vnginx version: nginx/1.13.2 Thanks for help. Best Regards, |
what is the update on using nginx with grpc? |
No, was not lucky with the patch to get it working. You can use haproxy
with grpc.
…On Sun, Oct 15, 2017 at 2:51 AM, Ashish Sinha ***@***.***> wrote:
what is the update on using nginx with grpc?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS4RIa7n059Ft806GmCaO4qJIz0RaX9dks5ssSXmgaJpZM4JHi3Q>
.
|
So for anyone else here that want's to know the config to make it work I managed to get it going using @PiotrSikora patch. You need to disable buffering in order to make grpc streams work. @PiotrSikora, any idea if they plan to pull this? Pretty happy it works and it would help me out a lot.
|
waiting for good news |
@snowzach |
@mritunjayblr it's basically just that.. GRPC is listening at a url of whatever the GRP package name is followed by the service name... So if in your proto definition you have package bob service barker { your GRPC is technically listening at /bob.barker on your HTTP2 server. |
If folks want to, happy to contribute the example based on what I did in https://github.com/mhausenblas/kruiser/blob/master/how-does-it-work.md … however, I'm still struggling with serving from non-root URL. So works fine with location |
Good news finally comes! |
This comment has been minimized.
This comment has been minimized.
si tienen dudas o preguntas chequen https://github.com/areliszxz/nginx-grpc-grpcs es mi primer tuto pero ya pase por todo el show de nginx y grpc-s |
Hi Ashish,
the latest nginx already supports gRPC both in front end and backend.
https://www.nginx.com/blog/nginx-1-13-10-grpc/
Likewise, haproxy too supports grpc both in front end and backend.
https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/
Cheers,
Divakar
…On Sun, Oct 15, 2017 at 2:51 AM Ashish Sinha ***@***.***> wrote:
what is the update on using nginx with grpc?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS4RIa7n059Ft806GmCaO4qJIz0RaX9dks5ssSXmgaJpZM4JHi3Q>
.
|
No description provided.
The text was updated successfully, but these errors were encountered: