With use cases bringing us more data I wanted to suggest these changes.

With inlining election timeout updates we double the lock contention and most likely introduced head of line issues for routes under heavy load.
Also slowing down heartbeats with so many assets being deployed in our user ecosystem, also moved the normal follower to candidate timing further out, similar to the lost quorum.
Note that the happy path transfer will still be very quick.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2022-05-12 14:38:12 -07:00
parent 2cb2a8ebbc
commit ccd2290355
3 changed files with 18 additions and 12 deletions

View File

@@ -424,7 +424,7 @@ func (sc *supercluster) leader() *Server {
func (sc *supercluster) waitOnLeader() {
sc.t.Helper()
expires := time.Now().Add(5 * time.Second)
expires := time.Now().Add(10 * time.Second)
for time.Now().Before(expires) {
for _, c := range sc.clusters {
if leader := c.leader(); leader != nil {