Forum Discussion
hooleylist
Jul 13, 2011Cirrostratus
Out of curiosity, what's the use case for killing active connections to the virtual server?
Short of deleting the connection table entries, there isn't a built in way to kill existing connections. You can set the virtual server down, but existing connections will still be allowed. Likewise, you can set a pool member or node to forced offline to prevent new connections or connections from clients with a persistence record from being allowed.
There isn't a way to get the virtual server status from an iRule. You can get a count of active members in the pool using the active_members command. I suppose you could disable the pool instead and then check in HTTP_REQUEST for [active_members [LB::server pool]] == 0 and send an HTTP response with HTTP::respond or a TCP reset with reject.
Aaron