-
-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script intervel in millisecond. #2546
Comments
We don't want keepalived due to overheads of forking and execing the script causing a not insignificant load on the system. If you can post your /etc/keepalived/health_check.sh script, we may be able to suggest some alternatives that would give you the sort of response time that you want. With your current VRRP configuration it will take between 2.648 and 3.648 seconds before a backup takes over as master once the health_check.sh identifies a failure (this 1 second time range is due to the fault could occur anywhere in the 1 second interval between adverts). Also, specifying There are various ways that you can improve these times:
Regarding the health_check.sh script itself, keepalived has various options to detect failure states much quicker (and more efficiently) than a track script can, so if we can see what the script is doing we may be able to suggest faster alternatives. |
How do I specify vrrp_version 3 in the configuration file ? |
@muhammedShanSyber Apologies, it should be |
keepalived don't support vrrp version 3 ? Thats what I heard from the AI . If keepalived works with version 3 , what should I change in the configuration ? Should I change the vrrp_instance VI_1 to vrrp_instance VI_3 ? cat /etc/keepalived/keepalived.conf
|
You either add
or you add
|
Okay. Is it possible to do something about advert_int 1 ? From 1 sec to 500 millisecond ? |
Will there be an update in the coming days for implementing milliseconds ? I tried editing VI_1 to VI_3 and included vrrp_version 3 in global_defs , both are not working. service status of keepalived shows errors that says It doesn't support version 3. I changed back the defaults , faced issue again with keepalived and now reinstalled it. Now its working but there is a delay about 1 second. |
There will be no update since keepalived already supports advert intervals in multiples of 10ms. If you specify |
There is no need to change the vrrp instance name from VI_1 to VI_3 - it doesn't make any difference. Please post your configuration and the full logs when keepalived starts up, so we can see the error message saying that version 3 is not supported. |
Okay. I have changed the advert_int 1 to advert_int 0.01
And here is the service status :
|
As it says in the logs: You need to add
|
Updated configuration file and restart the service . here is the current status :
After few seconds the status looks like this :
config file :
|
According to the logs you have changed the configuration on one system to use vrrp version 3, but you have not updated the other system to do so. The vrrp version needs to match on both systems. Once you have fixed the above, you can then reduce the configured advert interval on both systems from As I have previously asked, will you please post the FULL logs of keepalived from the time it starts, and not just the latest few entries produced by Also, again as I have previously asked, will you please post the contents of /etc/keepalived/health_check.sh so that we can make recommendations of how that can be speeded up. |
I have changed configuration on both the servers and restarted the services. Stopped the service to check failover is running or not.
server 2 service status :
Should I do anything about the authentication. Says version 3 doesn't support authentication. Here is the configuration of server 1 and server 2 : server config :
server 2 config :
and here is health check configuration :
|
You should remove the authentication block since, at is says, VRRPv3 does not support authentication. Is there a reason that you are using unicast rather than multicast? If multicast would work for you, I suggest removing the You have commented out/removed the track_script and I think that is right, because VRRP will now detect the other system is down/unreachable before the track_script can. I also recommend removing For a marginally faster failover time, increase the priorities and use 250 and 240. If you want a faster indication than 0.04 seconds that the remote system is not available, you could use If you make the above changes (excluding
The only difference in the configuration on server 2 is the priority. |
I've successfully implemented clustering using keepalived with 2 ubuntu servers. And It is working fine except I can't change the intervel to millisecond in vrrp_script.
Server 2 - backup configuration :
I'm trying to eliminate downtime which is not possible ( 100% ). But some how I like to decrease the downtime to milliseconds.
The text was updated successfully, but these errors were encountered: