Commit 84e84de
committed
clientv3: backoff resetting LeaseKeepAlive stream
A large number of client leases can cause cascading failures within the
etcd cluster. Currently, when the keepalive stream has an error we will
always wait 500ms and then try to recreate the stream with
LeaseKeepAlive(). Since there is no backoff or jitter, if the lease
streams originally broke due to overload on the servers the retries can
cause a cascading failure and put more load on the servers.
We can backoff and jitter -- similar to what is done in watch streams --
in order to alleviate server load in the case where leases are causing
the overload.
Signed-off-by: Elias Carter <elias@dropbox.com>1 parent 8a4955b commit 84e84de
2 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| 465 | + | |
461 | 466 | | |
462 | 467 | | |
463 | 468 | | |
| 469 | + | |
464 | 470 | | |
465 | 471 | | |
466 | 472 | | |
467 | 473 | | |
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
| |||
485 | 492 | | |
486 | 493 | | |
487 | 494 | | |
| 495 | + | |
| 496 | + | |
488 | 497 | | |
489 | | - | |
| 498 | + | |
490 | 499 | | |
491 | 500 | | |
492 | 501 | | |
| |||
607 | 616 | | |
608 | 617 | | |
609 | 618 | | |
610 | | - | |
| 619 | + | |
611 | 620 | | |
612 | 621 | | |
613 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments