-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Leader failover too slow, taking 40 seconds #1227
Comments
@Amethystic |
@Amethystic Yeah. Just as @abronan say:
|
Bad luck since we have to use Consul. Do you think it's okay to change the source code directly to set a lower TTL ? |
@Amethystic |
Thanks for the nice responding. Below is what I wanna do, correct me if I am wrong: Do you think it's a workable way to set lower TTL since the default 15 seconds is too long. |
@Amethystic Aha, I'm not familiar with |
Thanks. @abronan , please kindly advise. |
Hi @Amethystic, you can't set the TTL lower than 20 seconds with Consul using |
I'll handle this on |
Please also add support to specify lock-delay when creating consul sessions. |
How can I specify lock-delay for a consul session which is used as a leadership election? Seems Swarm hard-coded 15 seconds as the default value. Can I change it? |
@Amethystic It's done in #1228 you might want to take a look, just waiting for it to be reviewed and merged ;) |
@Amethystic Ah just realized, no there is no way to specify the |
@abronan Thanks for the information, but the result shows the lock-delay is still 15 seconds as shown below: Do I make any mistake? |
@Amethystic Actually you are right because I just noticed that the |
Thanks! |
@Amethystic Coming back to this and it seems that it works as intended with Consul. Just using related to hashicorp/consul#1077 |
Hi there,
I've started two swarm managers with advertise set to their own hostnames. With consul, I could implement the leader failover successfully, but found the whole process always took 40 seconds before the new leader information was written to the KV store in consul. I guess this is becuase the default TTL for consul session is 15 seconds. Consul takes a conservative method to multiple it with a factor of two plus 10 seconds as the check interval.
Do you guys know how to descrease the failover interval? Sounds like no existing config parameters help. Thanks.
The text was updated successfully, but these errors were encountered: