From 85c0e41d6459f9bd72960c9a19af063a88cc876a Mon Sep 17 00:00:00 2001 From: Lemoe Date: Mon, 20 Jun 2022 11:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEnginx=E4=B8=8E=E4=B8=8A?= =?UTF-8?q?=E6=B8=B8=E5=93=AA=E5=90=92=E9=9D=A2=E6=9D=BFgrpc=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_US/guide/q3.md | 8 +++++++- docs/guide/q3.md | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/en_US/guide/q3.md b/docs/en_US/guide/q3.md index 84223c88..d7f6dd1d 100644 --- a/docs/en_US/guide/q3.md +++ b/docs/en_US/guide/q3.md @@ -17,9 +17,15 @@ server { location / { grpc_read_timeout 300s; grpc_send_timeout 300s; - grpc_pass grpc://localhost:5555; + grpc_socket_keepalive on; + grpc_pass grpc://grpcservers; } } + +upstream grpcservers { + server localhost:5555; + keepalive 1024; +} ``` - Caddy configuration files diff --git a/docs/guide/q3.md b/docs/guide/q3.md index 00eafc2f..4df30ed2 100644 --- a/docs/guide/q3.md +++ b/docs/guide/q3.md @@ -17,9 +17,15 @@ server { location / { grpc_read_timeout 300s; grpc_send_timeout 300s; - grpc_pass grpc://localhost:5555; + grpc_socket_keepalive on; + grpc_pass grpc://grpcservers; } } + +upstream grpcservers { + server localhost:5555; + keepalive 1024; +} ``` - Caddy 配置