Real Least Connections iRule
Kai, just saw your comment now (5 months later). Will take the feedback into consideration and revise the iRule. Good feedback, thank you. I realize now that I never got my head around lifetime vs timeout and in light of this, the whole approach of the iRule might be untenable since the table entries set early on (when connection counts are low) are almost inevitably going to timeout no matter what I set it to on any virtual where connection counts don't drop down to 0 on a regular basis (many will not).
Re: Note2, I wasn't so worried about the expense associated with execution of this iRule, because I think the situations that call for "improved" least connections (as opposed to the built-in) to deal with CMP idiosyncrasies are relatively low connection establishment rate virtuals (e.g. VDI) and all the code is only executing during connection establishment and teardown.