Files
redis/src
antirez 42091a79bb Sentinel failure detection implementation improved.
Failure detection in Sentinel is ping-pong based. It used to work by
remembering the last time a valid PONG reply was received, and checking
if the reception time was too old compared to the current current time.

PINGs were sent at a fixed interval of 1 second.

This works in a decent way, but does not scale well when we want to set
very small values of "down-after-milliseconds" (this is the node
timeout basically).

This commit reiplements the failure detection making a number of
changes. Some changes are inspired to Redis Cluster failure detection
code:

* A new last_ping_time field is added in representation of instances.
  If non zero, we have an active ping that was sent at the specified
  time. When a valid reply to ping is received, the field is zeroed
  again.
* last_ping_time is not reset when we reconnect the link or send a new
  ping, so from our point of view it represents the time we started
  waiting for the instance to reply to our pings without receiving a
  reply.
* last_ping_time is now used in order to check if the instance is
  timed out. This means that we can have a node timeout of 100
  milliseconds and yet the system will work well since the new check is
  not bound to the period used to send pings.
* Pings are now sent every second, or often if the value of
  down-after-milliseconds is less than one second. With a lower limit of
  10 HZ ping frequency.
* Link reconnection code was improved. This is used in order to try to
  reconnect the link when we are at 50% of the node timeout without a
  valid reply received yet. However the old code triggered unnecessary
  reconnections when the node timeout was very small. Now that should be
  ok.

The new code passes the tests but more testing is needed and more unit
tests stressing the failure detector, so currently this is merged only
in the unstable branch.
2014-03-21 11:16:11 +01:00
..
2012-04-13 18:05:51 -07:00
2013-01-19 11:03:19 +01:00
2013-01-19 11:03:19 +01:00
2014-03-10 23:04:37 +01:00
2013-05-14 11:22:58 +02:00
2013-01-19 11:03:19 +01:00
2014-03-05 10:16:12 +01:00
2013-12-13 13:14:47 +01:00
2013-06-26 15:21:55 +02:00
2013-01-19 11:03:19 +01:00
2013-01-19 11:03:19 +01:00
2014-01-22 09:56:35 +01:00
2013-07-16 15:43:41 +02:00
2013-12-12 11:25:48 +01:00
2013-08-12 11:38:28 +02:00
2013-01-19 11:03:19 +01:00
2013-07-24 18:59:36 +02:00
2013-07-02 12:24:08 +02:00
2011-07-06 15:22:00 +02:00
2014-03-05 14:42:50 +01:00
2013-09-03 15:15:42 +02:00