Forum Discussion

James_Yang_9981's avatar
James_Yang_9981
Icon for Altostratus rankAltostratus
Mar 11, 2009

how to use persist lookup command

in one case I need manually select node depends on the status of server in the persist table. if the node is down, LTM need reject the client connection that is already in the persist table instead of select a new pool member. if the node is recovered during the persist table timeout, LTM need following the persist table select the old server for the same client new connection. source ip address persist is used in this case.

 

 

I figured out a rules to accomplish this, but not sure how to use persist lookup command.

 

 

the rules is like below:

 

 

when CLIENT_ACCEPTED {

 

persist lookup source_addr [IP::remote_addr] [all_status]

 

if {LB::status $all_status:nodename} {

 

node $all_status:nodename

 

else {

 

reject

 

}

 

}

 

 

the question is how to extract the node name from LTM's persist table, from irules wiki, only found following:

 

persist lookup [all|node|port|pool] "all" or no specification returns a list containing the node, port and pool name.

 

Specifying any of the other return types will return the specified item only.

 

= | { [any virtual|service|pool] [pool ] }

 

the latter key specification is used to access persistence entries across virtuals, services, or pools.

 

 

 

 

12 Replies