poppyred / python-consul2

Python client for the Consul HTTP API ,Continue develop on cablehead/python-consul
https://python-consul2.readthedocs.io/
MIT License
130 stars 28 forks source link

consul保持长连接问题 #27

Closed JSK520 closed 3 years ago

JSK520 commented 3 years ago

看了下源码,不支持传 request 非长连接的参数,这样对服务来说不太友好。我们方案是首次读consul,然后写文件,隔一段时间创建新连接连接 consul,这会导致两个问题: 1、连接会越来越多 2、一直保持长连接

不想复用连接的原因是:可能有断开的风险,这样代码层面需要考虑过多情况,同时当开启多个进程时,会导致连接过多的情况

我看作者是咱中国同胞,希望加个联系方式沟通

poppyred commented 3 years ago

@JSK520 春节快乐! 有参数控制wait时间的. 这儿. 373251686@qq.com 邮箱联系哦.