Forum Discussion

Ninjai_DI_67376's avatar
Ninjai_DI_67376
Icon for Nimbostratus rankNimbostratus
Dec 31, 2005

Help,does this rule work correctly?

I have created a pool.This pool has 8 members. Four member priority is set to 8,the rest is 1.If the request is sent to the server which priority is 1,no persist needed.If the server priority is 8,source persist needed.The rule is as follows:

rule dynamic_group1 {
   when HTTP_REQUEST { 
    pool dynamic1
}
when LB_SELECTED {
    if { [LB::server priority] >= 8 } {
        persist source_addr 1800
    }
    else {
        persist none 
    }
}
}

Does it work correctly?

Thanks.
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    That looks correct to me, according to the logic you stated above. Have you tested the rule yet? You might want to add some logging statements to be sure the persistence is or isn't being set as you desire.

     

     

    -Colin
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    The problem you'll have is that you can't pick a persisted server after the server has been picked. You have a catch-22. I'm not sure what you want to accomplish. Normally persistence will work just fine with priority members. The persisted pool member will not be used if the pool member is down and the persistence record is always updated to the pool member actually used.