15 Commits

Author SHA1 Message Date
Gyu-Ho Lee
805bcc828c clientv3: simplify V(4) logger with Lvl(4)
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-05 18:48:36 -08:00
Gyu-Ho Lee
103efd922b clientv3/balancer: only notify healthy addresses
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:39:25 -08:00
Gyu-Ho Lee
012b013538 clientv3: combine "healthBalancer" and "simpleBalancer"
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:38:05 -08:00
Xiang
59af91fc69 clientv3: use hostPortError in down function
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-22 18:01:31 -07:00
Xiang
63ab5addfa clientv3: do not mark stale endpoints as unhealthy 2017-10-22 17:59:26 -07:00
Gyu-Ho Lee
439c97d465 clientv3: remove balancer interface
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-20 16:31:02 -07:00
Gyu-Ho Lee
1549403dd2 clientv3: clean up logging, clarify var/field names
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 12:33:25 -07:00
Gyu-Ho Lee
ad24700252 clientv3: handle stale endpoint in health balancer
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 12:02:31 -07:00
Gyu-Ho Lee
500c2499f4 clientv3: reset unhealthy on updateAddrs
Otherwise, 'mayPin' incorrectly decides if an address
should be pinned or not.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-10 12:28:57 -07:00
Gyu-Ho Lee
e9e17e3fe5 clientv3: pin any endpoint when all unhealthy
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-09 16:02:18 -07:00
Gyu-Ho Lee
fbed568b6a clientv3/balancer: mark partitioned member as unhealthy
Previous behavior is when server returns errors, retry
wrapper does not do anything, while passively expecting
balancer to gray-list the isolated endpoint. This is
problematic when multiple endpoints are passed, and
network partition happens.

This patch adds 'endpointError' method to 'balancer' interface
to actively(possibly even before health-check API gets called)
handle RPC errors and gray-list endpoints for the time being,
thus speeding up the endpoint switch.

This is safe in a single-endpoint case, because balancer will
retry no matter what in such case.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-09 13:40:03 -07:00
Gyu-Ho Lee
1704443c6d clientv3: only health-check when timeout elapses since last failure
Otherwise network-partitioned member with active health-check
server would not be gray-listed, making health-balancer stuck
with isolated endpoint.

Also clarifies some log messages.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-09 13:40:03 -07:00
Gyu-Ho Lee
3f596db104 clientv3: add more health balancer debugging logs
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-02 15:38:36 -07:00
Gyu-Ho Lee
090c192517 clientv3: add debugging logs, warnings
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-26 07:16:16 +09:00
Anthony Romano
84db8fdaea clientv3: health check balancer 2017-09-15 14:24:46 -07:00