Forum Discussion

Magnum_IP's avatar
Magnum_IP
Icon for Nimbostratus rankNimbostratus
May 17, 2011

Can you reference the current number of connections to a Virtual Server in an iRule?

I am currently exploring the possibility of setting the Connection Limit value on a particular Virtual Server. Is there some way to reference the current connection value for the virtual server in an iRule?

 

 

Regards,

 

 

fergu5
  • ...and the connection limit value as set on the virtual server?

     

    fergu5

     

  • I don't think you can access the counts or limit from an iRule. However, you could track this yourself by incrementing a subtable entry on CLIENT_ACCEPTED and decrementing it on CLIENT_CLOSED. For the connection limit value, you'd need to hard code this in the iRule.

     

     

    Aaron
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Aaron's correct, there currently isn't any way to query this type of information about the virtual server. You could get the name of the virtual you're on with the virtual command, though, and store a list of virtual name -> info mappings in a class, if you want. That way you could manage the info in bulk, relatively easily, and the iRule could dynamically pull the info as necessary and act accordingly.

     

     

    Colin
  • Time for some lateral thinking or back to the drawing board on this prob;-)