-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx转发consul问题 #250
Comments
错误类型 如同这个问题: #221 (comment) |
问题1: 192.168.20.103:8500 是consul集群的其中一个节点,现在consul集群有3个节点,upstream里面的upsync能否配置3个consul的地址? 这个问题,怎么解决的呢? |
你可以加个负载均衡。
…------------------------------------------------------------------
发件人:wanglin90 <[email protected]>
发送时间:2019年8月19日(星期一) 11:48
收件人:weibocom/nginx-upsync-module <[email protected]>
抄 送:Subscribed <[email protected]>
主 题:Re: [weibocom/nginx-upsync-module] nginx转发consul问题 (#250)
问题1: 192.168.20.103:8500 是consul集群的其中一个节点,现在consul集群有3个节点,upstream里面的upsync能否配置3个consul的地址?
这个问题,怎么解决的呢?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
个人理解: |
还是一个问题啊,节点IP 不能是单点啊,client 如果出现故障,还是会影响啊,问题的重点不在client模式还是server模式,重点是要能连接多个consul节点 |
你好 问题解决了吗 |
upstream配置如下:
}
问题1: 192.168.20.103:8500 是consul集群的其中一个节点,现在consul集群有3个节点,upstream里面的upsync能否配置3个consul的地址?
问题2: 如果不能配置多个consul地址,我只能用nginx本身做转发consul
然后业务的upstream配置
upsync consul-nginx.test.in/v1/kv/upstreams/infra-service upsync_timeout=6m
upsync_interval=2000ms upsync_type=consul strong_dependency=off;
上面这种配置nginx的errlog 会经常报错502
2019/04/27 14:31:02 [error] 9100#9100: *6511083 no live upstreams while connecting to upstream, client: 192.168.20.110, server: consul-nginx.test.in, request: "GET /v1/kv/upstreams/infra-service?recurse&index=543011 HTTP/1.0", upstream: "http://consul-server/v1/kv/upstreams/infra-service?recurse&index=543011", host: "consul-nginx.test.in"
2019/04/27 14:31:02 [error] 9099#9099: upsync_consul_parse_init: recv upstream "infra-service" error; http_status: 502
The text was updated successfully, but these errors were encountered: