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?
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'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.