airbnb / nerve

A service registration daemon that performs health checks; companion to airbnb/synapse
MIT License
942 stars 151 forks source link

Set explicit zk session timeout in nerve #128

Closed gmcatsf closed 4 years ago

gmcatsf commented 4 years ago

Summary

Current nerve does not specify explicit value for session timeout. By default ruby client uses RECEIVE_TIMEOUT=10000ms which leads to 20-sec session in zk server.

https://github.com/zk-ruby/zookeeper/blob/master/ext/c_zookeeper.rb#L20

The change adds receive_timeout_msec=16000 when creating zk client and will set session timeout to be 32-sec. This value will be different from other clients making it possible to identify nerve connections/sessions.

Test

Reviewers

@panchr @austin-zhu @Jason-Jian

gmcatsf commented 4 years ago

Updated version to 0.9.7

gmcatsf commented 4 years ago

@panchr could you pls merge it as I do not have write access?