Re: Setting IPVS/LVS timeout in Keepalived
"Ryan O'Hara" <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Dec 12, 2013 at 07:14:47PM +0200, Ville Törhönen wrote: > Hi, > > 12.12.2013 16:54, Ryan O'Hara wrote: > >On Thu, Dec 12, 2013 at 09:28:25AM -0500, Paul Robert Marino wrote: > >>On Red Hat I would put that in /etc/sysconfig/keepalived even though > >>thats a kludge as well its at least a little cleaner. > > > >Can you explain how this would work? > > This would work as /etc/sysconfig/keepalived is executed in > /etc/init.d/keepalived: > > . /etc/sysconfig/keepalived Right. That is what I suspected. For some reason I was concerned that this was just expected to work. But the init script would have to be made aware of these options and I am not entirely sure how systemd deal with these sorts of things. > This brings the user defined KEEPALIVED_OPTIONS variable to the init > script. You could add commands to that file just as well, but it's > still a kludge I think. > > >>On Thu, Dec 12, 2013 at 6:25 AM, Ville Törhönen <[email protected]> wrote: > >>>As expected, these modifications are not persistent and they are lost > >>>after system restart. If the current LVS configuration is printed out > >>>with 'ipsetadm-save -n', the timeout values aren't included. This makes > >>>it impossible to reload the timeout values with the ipvsadm init script. > > > >Right, but as I am sure you know keepalived does not care about the > >ipvsadm init script. We had this same issue in Piranha a while back > >and I ended up adding the timeouts as options in the config file. > > That's true, as they are just two different services. By default the > ipvsadm init script loads the previous output of 'ipsetadm-save -n', > and if it would include the TCP timeout values (set by 'ipvsadm > --set') this problem could be solved by "starting" both ipvsadm and > keepalived on appropriate run levels. That is an interesting idea and it might just work as long as you *only* save the ipvs timeouts. > >>>This has been discussed several times in the lvs-users mailing list. It > >>>has always come to a conclusion that LVS/IPVS is a framework and that > >>>the management application should do the configuring. I know that there > >>>are other ways to implement this, such as setting the timeout value in > >>>/etc/rc.local, but it's obviously a nasty kludge. > > > >I'd be happy to add this to keepalived, but I'd like some ideas on > >where these options would be place in the config file. The real_server > >blocks and the primary means to configure ipvs related in keepalived, > >but these timeouts are not set on a per real server basis. I'd suggest > >we either add a new top-level config keyword or set them in > >global_defs. > > > >Opinions? > > > >Ryan > > Good to hear. Personally I think the best place would be > global_defs, as this truly is a global definition. Keywords could be > something like tcp_timeout, tcp_timeout_fin and udp_timeout. As you > said, because of the LVS implementation it's not possible to add > different timeouts per virtual server - although it would be very > useful on some cases. I tend to agree, but global_defs had nothing to do with ipvs. In other words, you can run keepalived in vrrp-only mode in which case we'd need to ignore any timeouts set in global_defs. Perhaps a new config block like: ipvs_timeouts { tcp 900 tcpfin 120 udp 300 } Alexandre, do you have a preference? Ryan > Ville > > > > > > >>>Thanks, > >>>Ville > >>> > >>>------------------------------------------------------------------------------ > >>>Rapidly troubleshoot problems before they affect your business. Most IT > >>>organizations don't have a clear picture of how application performance > >>>affects their revenue. With AppDynamics, you get 100% visibility into your > >>>Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > >>>http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > >>>_______________________________________________ > >>>Keepalived-devel mailing list > >>>[email protected] > >>>https://lists.sourceforge.net/lists/listinfo/keepalived-devel > >> > >>------------------------------------------------------------------------------ > >>Rapidly troubleshoot problems before they affect your business. Most IT > >>organizations don't have a clear picture of how application performance > >>affects their revenue. With AppDynamics, you get 100% visibility into your > >>Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > >>http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > >>_______________________________________________ > >>Keepalived-devel mailing list > >>[email protected] > >>https://lists.sourceforge.net/lists/listinfo/keepalived-devel > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk