Skip to contentSkip to conversation

Ldirectord Feature Request

DISCUSSION Caleb Anthony 3 participants 5 messages May 1, 2009 – May 7, 2009 IPVS

lore
Share & tools
lore
#0 lore raw

Hello,

In my organization we use ldirectord to monitor and maintain the ipvs table. It works great, except that we run a bit of a strange setup that involves nested ipvs (ipvs forwarding to another ipvs), and a combination of direct routing and IP tunneling. I'm actually in the process of writing up a small of a testimonial about our configuration, which I don't think is very common, or maybe ever been used at all. But, in our endeavors we've come across two limitations with ldirectord in our environment.

First, we use the source hash scheduling algorithm to maintain affinity with real servers. And according to the documentation that I have seen, the weight setting really means "number of connections" to the source hash scheduler. This is a problem for us with the fallback setting, because ldirectord doesn't allow you to set the weight of a fallback server. Instead, it just defaults to 1. So, in the event of an emergency, ipvs is only going to allow 1 connection at a time to our fallback server. Being able to specify the weight of a fallback server would be a great addition for us.

Our second suggestion would be to have the ability to specify multiple fallback servers, just like you can with real servers. It's hard for me to explain why we can't live with just one fallback server without a huge explanation about our setup, but basically we have more than one fallback server that serves real content, and if a failure occurred, we have to hope that that one server we have configured is not only running, but able to handle the sudden load. Also, I'm not entirely sure if fallback servers are health monitored. I ask because, if we could specify multiple fallback servers, we would like them to be monitored just like a real server and added or removed from the ipvs table as necessary.

Any thoughts - pro or con about these requests?

Thanks.

maintainer
#1 lore raw

Hi,

Quoted 11 lines · Caleb Anthony

Hello,

In my organization we use ldirectord to monitor and maintain the ipvs table. It works great, except that we run a bit of a strange setup that involves nested ipvs (ipvs forwarding to another ipvs), and a combination of direct routing and IP tunneling. I'm actually in the process of writing up a small of a testimonial about our configuration, which I don't think is very common, or maybe ever been used at all. But, in our endeavors we've come across two limitations with ldirectord in our environment.

Quoted 9 lines

First, we use the source hash scheduling algorithm to maintain affinity with real servers. And according to the documentation that I have seen, the weight setting really means "number of connections" to the source hash scheduler. This is a problem for us with the fallback setting, because ldirectord doesn't allow you to set the weight of a fallback server. Instead, it just defaults to 1. So, in the event of an emergency, ipvs is only going to allow 1 connection at a time to our fallback server. Being able to specify the weight of a fallback server would be a great addition for us.

I'll double check, but I think the weight specifies a proportion of conections rather than an absolute number. Could you let me know which documentation you are looking at?

Quoted 11 lines

Our second suggestion would be to have the ability to specify multiple fallback servers, just like you can with real servers. It's hard for me to explain why we can't live with just one fallback server without a huge explanation about our setup, but basically we have more than one fallback server that serves real content, and if a failure occurred, we have to hope that that one server we have configured is not only running, but able to handle the sudden load. Also, I'm not entirely sure if fallback servers are health monitored. I ask because, if we could specify multiple fallback servers, we would like them to be monitored just like a real server and added or removed from the ipvs table as necessary.

Fallback servers are not monitored at this time. Implementing Fallback as a second pool of monitored servers would be possible to add to ldirectord, though it would be a non-trivial change. In other words, it would be a reasonable amount of work. But I can't see any disadvantages to your idea as it should be possible to maintain the existing model too.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K. Satellite Lab in Sydney, Australia
  H: www.vergenet.net/~horms/            W: www.valinux.co.jp/en
#2 lore raw
Quoted 3 lines · Simon Horman

I'll double check, but I think the weight specifies a proportion of conections rather than an absolute number. Could you let me know which documentation you are looking at?

it's the number of connections

see section 4.10.2 of

http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.ipvsadm.html#SH-scheduler

no-one used the -SH scheduler for years because no-one understood how to use it. I expect that weighting by the number of connections was probably the easiest to code up, but it's not particularly useful

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
maintainer
#3 lore raw

Hi Joe,

Quoted 7 lines · On Sat, May 02, 2009 at 05:33:43AM -0700, Joseph Mack NA3T wrote:
Quoted 3 lines · Simon Horman

I'll double check, but I think the weight specifies a proportion of conections rather than an absolute number. Could you let me know which documentation you are looking at?

Quoted 5 lines

it's the number of connections

see section 4.10.2 of

http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.ipvsadm.html#SH-scheduler

That may have been the case in the past, but examining the code now I don't see any evidence of weight = number of connections for the purpose of calculating overload.

As far as I can see a real-server is only regarded as being overloaded if the IP_VS_DEST_F_OVERLOAD flag is set. And that flag only seems to be set in ip_vs_bind_dest() where the criteria is that u-threshhold - as supplied by ipvsadm - has been exceeded.

Specifically, I am looking at ip_vs_sh_schedule(), ip_vs_sh_get() and is_overloaded() in net/netfilter/ipvs/ip_vs_sh.c in 2.6.30-rc4.

Caleb, are you observing that weight = number of connections? If so, which kernel are you running?

Quoted 3 lines

no-one used the -SH scheduler for years because no-one understood how to use it. I expect that weighting by the number of connections was probably the easiest to code up, but it's not particularly useful

I agree with your comments regarding utility. If it is the case then I think it should be changed.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K. Satellite Lab in Sydney, Australia
  H: www.vergenet.net/~horms/            W: www.valinux.co.jp/en
#4 lore raw

I just ran a test (on kernel 2.6.27-7) and Simon is right, weight does not equal the number of connections with the source hash scheduler. Looks like the documentation needs to be updated.

Thanks for pointing this out.

Since ldirectord doesn't need to be changed in regards to the weight setting for a fallback server for my situation, I'll take a stab at adding the functionality to specify multiple fallback servers in ldirectord.cf. It seems like it should be a simple enough addition.

Thanks again.

Quoted 45 lines · Simon Horman

Hi Joe,

Quoted 7 lines · On Sat, May 02, 2009 at 05:33:43AM -0700, Joseph Mack NA3T wrote:
Quoted 3 lines · Simon Horman

I'll double check, but I think the weight specifies a proportion of conections rather than an absolute number. Could you let me know which documentation you are looking at?

Quoted 5 lines

it's the number of connections

see section 4.10.2 of

http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.ipvsadm.html#SH-scheduler

That may have been the case in the past, but examining the code now I don't see any evidence of weight = number of connections for the purpose of calculating overload.

As far as I can see a real-server is only regarded as being overloaded if the IP_VS_DEST_F_OVERLOAD flag is set. And that flag only seems to be set in ip_vs_bind_dest() where the criteria is that u-threshhold - as supplied by ipvsadm - has been exceeded.

Specifically, I am looking at ip_vs_sh_schedule(), ip_vs_sh_get() and is_overloaded() in net/netfilter/ipvs/ip_vs_sh.c in 2.6.30-rc4.

Caleb, are you observing that weight = number of connections? If so, which kernel are you running?

Quoted 3 lines

no-one used the -SH scheduler for years because no-one understood how to use it. I expect that weighting by the number of connections was probably the easiest to code up, but it's not particularly useful

I agree with your comments regarding utility. If it is the case then I think it should be changed.

--
Simon Horman
 VA Linux Systems Japan K.K. Satellite Lab in Sydney, Australia
 H: www.vergenet.net/~horms/            W: www.valinux.co.jp/en