Changeset 7233:2713b2dbf5bb in nginx


Ignore:
Timestamp:
03/17/18 20:04:24 (2 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

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.

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • auto/modules

    r7229 r7233  
    745745    fi
    746746
     747    if [ $HTTP_GRPC = YES -a $HTTP_V2 = YES ]; then
     748        ngx_module_name=ngx_http_grpc_module
     749        ngx_module_incs=
     750        ngx_module_deps=
     751        ngx_module_srcs=src/http/modules/ngx_http_grpc_module.c
     752        ngx_module_libs=
     753        ngx_module_link=$HTTP_GRPC
     754
     755        . auto/module
     756    fi
     757
    747758    if [ $HTTP_PERL != NO ]; then
    748759        ngx_module_name=ngx_http_perl_module
  • auto/options

    r7072 r7233  
    8787HTTP_UWSGI=YES
    8888HTTP_SCGI=YES
     89HTTP_GRPC=YES
    8990HTTP_PERL=NO
    9091HTTP_MEMCACHED=YES
     
    263264        --without-http_uwsgi_module)     HTTP_UWSGI=NO              ;;
    264265        --without-http_scgi_module)      HTTP_SCGI=NO               ;;
     266        --without-http_grpc_module)      HTTP_GRPC=NO               ;;
    265267        --without-http_memcached_module) HTTP_MEMCACHED=NO          ;;
    266268        --without-http_limit_conn_module) HTTP_LIMIT_CONN=NO        ;;
Note: See TracChangeset for help on using the changeset viewer.