Forum Discussion

ancanada_4516's avatar
ancanada_4516
Historic F5 Account
May 26, 2006

iRule for optimum link choice

Hi all,

 

 

I pretend to make an irule for link controller, that helps to choose the best link for every single connection, comparing the round trip time through each link to the far end destination.

 

 

Let's say that we have an outgoing connection to 100.1.1.1, and the managed links snat with 1.0.0.1 and 2.0.0.2

 

 

How can we measure the rtt between 1.0.0.1 and 100.1.1.1, and also between 2.0.0.2 and 100.1.1.1, and then compare them?

 

 

Is ROUTE::rtt using the destination IP address of the incoming packet to the 0.0.0.0:* vs? and then...:

 

 

Something like:

 

 

when CLIENT_ACCEPTED

 

{

 

if {[ROUTE::rtt "1.0.0.1"] < [ROUTE::rtt "2.0.0.2"] } {

 

use pool gateway_pool member 1.0.0.1:0

 

} else {

 

use pool gateway_pool member 2.0.0.2:0

 

}

 

}

 

 

Or I should use TCP::rtt and then choosing somehow every pool member to calculate rtt from?

 

 

Thanks for the advise!

 

 

AC