From 56ad960e7a3d4cf16c03ff231616a76c4834e548 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Sat, 17 Mar 2018 23:04:24 +0300 Subject: The gRPC proxy module. The module allows passing requests to upstream gRPC servers. The module is built by default as long as HTTP/2 support is compiled in. Example configuration: grpc_pass 127.0.0.1:9000; Alternatively, the "grpc://" scheme can be used: grpc_pass grpc://127.0.0.1:9000; Keepalive support is available via the upstream keepalive module. Note that keepalive connections won't currently work with grpc-go as it fails to handle SETTINGS_HEADER_TABLE_SIZE. To use with SSL: grpc_pass grpcs://127.0.0.1:9000; SSL connections use ALPN "h2" when available. At least grpc-go works fine without ALPN, so if ALPN is not available we just establish a connection without it. Tested with grpc-c++ and grpc-go. --- auto/modules | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'auto/modules') diff --git a/auto/modules b/auto/modules index a10c42d1e..73a9bae9b 100644 --- a/auto/modules +++ b/auto/modules @@ -744,6 +744,17 @@ if [ $HTTP = YES ]; then . auto/module fi + if [ $HTTP_GRPC = YES -a $HTTP_V2 = YES ]; then + ngx_module_name=ngx_http_grpc_module + ngx_module_incs= + ngx_module_deps= + ngx_module_srcs=src/http/modules/ngx_http_grpc_module.c + ngx_module_libs= + ngx_module_link=$HTTP_GRPC + + . auto/module + fi + if [ $HTTP_PERL != NO ]; then ngx_module_name=ngx_http_perl_module ngx_module_incs=src/http/modules/perl -- cgit