spacewander commented on a change in pull request #3547:
URL: https://github.com/apache/apisix/pull/3547#discussion_r571760883
##########
File path: doc/grpc-proxy.md
##########
@@ -36,7 +36,8 @@ gRPC client -> APISIX -> gRPC/gRPCS server
Here's an example, to proxying gRPC service by specified route:
* attention: the `scheme` of the route's upstream must be `grpc` or `grpcs`.
-* attention: APISIX use TLS‑encrypted HTTP/2 to expose gRPC service, so need
to [config SSL certificate](https.md)
+* attention: APISIX use TLS‑encrypted HTTP/2 to expose gRPC service (default
port 9443), so need to [config SSL certificate](https.md)
+* attention: APISIX also support to expose gRPC service with plaintext HTTP/2
(default port 9081), which do not need to config SSL certificate, usually used
to proxy gRPC service in intranet environment
Review comment:
Need a configuration to show how we can do it.
##########
File path: conf/config.yaml
##########
@@ -31,6 +31,12 @@
#
# If the configured environment variable can't be found, an error will be
thrown.
apisix:
+ node_listen:
+ - port: 9080 # APISIX listening port
Review comment:
We should provide the configuration separately in:
https://github.com/apache/apisix/blob/26a4ed4ad491f140fe441df281365c44723cae20/.travis/linux_openresty_common_runner.sh#L125
##########
File path: conf/config.yaml
##########
@@ -31,6 +31,12 @@
#
# If the configured environment variable can't be found, an error will be
thrown.
apisix:
+ node_listen:
+ - port: 9080 # APISIX listening port
+ enable_http2: false # Disable to support HTTP proxy, nginx
currently do not support HTTP and HTTP/2 with plaintext on the same port
+ # Details can be found in
https://trac.nginx.org/nginx/ticket/816
+ - port: 9081 # APISIX listening port for HTTP/2 with
plaintext
Review comment:
Don't open a port for HTTP/2 by default.
##########
File path: apisix/cli/ops.lua
##########
@@ -238,10 +238,18 @@ Please modify "admin_key" in conf/config.yaml .
util.die("missing apisix.proxy_cache for plugin proxy-cache\n")
end
- --support multiple ports listen, compatible with the original style
+ -- support multiple ports listen, compatible with the original style
if type(yaml_conf.apisix.node_listen) == "number" then
- local node_listen = {yaml_conf.apisix.node_listen}
+ local node_listen = {{port = yaml_conf.apisix.node_listen}}
yaml_conf.apisix.node_listen = node_listen
+ elseif type(yaml_conf.apisix.node_listen) == "table" then
+ if type(yaml_conf.apisix.node_listen[1]) == "number" then
Review comment:
I think we should check every item, what if the user mixes the integer
and the table?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]