Forum Discussion

dubdub's avatar
dubdub
Icon for Nimbostratus rankNimbostratus
Dec 23, 2011

Query currently selected pool

Hi all,

 

 

Per Deb's article at http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/130/iRules-101--05--Selecting-Pools-Pool-Members-and-Nodes.aspx, I am forcing selection of varying pools based on URI. I understand that if I do not force a selection, the pool will remain as the last selected pool for that connection. Is there a way to query which pool is currently assigned to a connection?

 

 

Thanks,

 

Jen

 

  • Hi Jen,

     

    Yes. I do not have a exact example for you, but you should be able to do this with using a TABLE command Click Here to populate a custom table which contains the IP address of the client and the pool that is selected.

     

     

    Armed with this table you can output to the screen much like how it's down in the following article Click Here

     

     

    I hope this helps

     

     

    Bhattman
  • dubdub's avatar
    dubdub
    Icon for Nimbostratus rankNimbostratus
    Hi Bhattman,

     

     

    I ended up using a subtable to store this info and access it on subsequent requests - it's working really well, thank you for the links!

     

     

    Thanks,

     

    Jen
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    The way in which you'd directly query this would be with the LB::server pool command. This would return null, however, for the first request of any new connection as there would be no LB decision made yet. Very cool stuff regardless. ;)

     

     

    Colin
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Oh. Yeah, basically what nitass said over there -> http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/2159099/showtab/groupforums/Default.aspx

     

     

    ;)

     

     

    Colin