]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
monc: backoff the timeout period when reconnecting
authorGreg Farnum <greg@inktank.com>
Wed, 12 Feb 2014 21:51:48 +0000 (13:51 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 13 Feb 2014 21:20:52 +0000 (13:20 -0800)
commit794c86fd289bd62a35ed14368fa096c46736e9a2
tree23bb605b3728d8acbe0e581dd860f29c09128be9
parent60da8abe0ebf17ce818d6fcc6391401878123bb7
monc: backoff the timeout period when reconnecting

If the monitors are systematically slowing down, we don't want to spam
them with reconnect attempts every three seconds. Instead, every time
we issue a reconnect, multiply our timeout period by a configurable; when
we complete the connection, reduce that multipler by 50%. This should let
us respond to monitor load.
Of course, we don't want to do that for initial startup in the case of a
couple down monitors, so don't apply the backoff until we've successfully
connected to a monitor at least once.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/common/config_opts.h
src/mon/MonClient.cc
src/mon/MonClient.h