Last active
March 23, 2020 08:08
-
-
Save yangl/d33f92813b1984d9bb7dc7fbd074a627 to your computer and use it in GitHub Desktop.
官方文档 http://nginx.org/en/docs/http/ngx_http_grpc_module.html http://nginx.org/en/docs/stream/ngx_stream_core_module.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream itao_bds_core_11800 { | |
hash $request_uri; | |
# hash $remote_addr consistent; | |
server 10.203.24.7:11800; | |
server 10.203.24.9:11800; | |
server 10.203.24.12:11800; | |
server 10.203.24.60:11800; | |
} | |
server { | |
listen 1080 http2; | |
server_name apm-api.intsit.sfdc.com.cn; | |
access_log logs/access-grpc.log main; | |
location / { | |
grpc_pass grpc://itao_bds_core_11800; | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes auto; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
stream { | |
upstream k24 { | |
server 10.206.28.67:9092; | |
server 10.206.28.68:9092; | |
server 10.206.28.69:9092; | |
} | |
server { | |
listen 19092; | |
proxy_connect_timeout 3s; | |
proxy_timeout 1m; | |
proxy_pass k24; | |
} | |
upstream b24 { | |
server 10.206.21.223:9092; | |
server 10.206.21.226:9092; | |
server 10.206.22.1:9092; | |
} | |
server { | |
listen 29092; | |
proxy_connect_timeout 3s; | |
proxy_timeout 1m; | |
proxy_pass b24; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment