Forum Discussion

MyWebsiteAdvise's avatar
MyWebsiteAdvise
Icon for Nimbostratus rankNimbostratus
Mar 23, 2008

Virtual Current Connection Parameter ?

Hello,

 

 

Is there a parameter that return the number of concurrent connection of virtual ?

 

 

I'm trying to create an irule that will accept 100 connection on virt only.

 

I did find some connection limit irules, but I prefer something shorter and efficient.

 

 

Thanks,

 

Alex Webs

3 Replies

  • Hi Alex,

     

    I haven't found a better way then what other's have posted already for you specific scenerio. If you want something straight forward, w/o effort, there is a setting on the virtual server for limitting concurrent connections.

     

     

    /CB

     

  • Hi,

     

     

    I find nice iRule that will limit connections.

     

    Someone knows what will the load on f5 with this script ? I am planning to limit one of the virtuals to 14000 connections and redirect all new connection to another url.

     

     

     

     

    I want to use this script:

     

    rule session_limit {

     

    when RULE_INIT {

     

    set ::total_active_clients 0

     

    set ::max_active_clients 50

     

    }

     

    when HTTP_REQUEST {

     

    ; If persistence cookie already exists,

     

    ; allow persistent connection without incrementing counter

     

    if { [HTTP::cookie exists "BIGipServerhalifax"] } {

     

    pool halifax

     

    return

     

    ; If no cookie, check for URI link parameter

     

    ; & redirect if present

     

    } else {

     

    if { [HTTP::uri] contains "linkID=halifax" } {

     

    HTTP::redirect "http://pleasehold.evenue.net/bigip/nocookies.html"

     

    return

     

    }

     

    ; Still no cookie

     

    ; Check limit vs. active

     

    ; Allow in if there's room, and incr counter for this new cnx

     

    if { $::total_active_clients < $::max_active_clients } {

     

    incr ::total_active_clients

     

    pool halifax

     

    return

     

    ; otherwise redirect

     

    } else {

     

    HTTP::redirect "http://www.yahoo.com/"

     

    return

     

    }

     

    }

     

    }

     

    when CLIENT_CLOSED {

     

    incr ::total_active_clients -1

     

    }

     

    }

     

     

     

    Is there any other recommended script to limit connection on virtual ?

     

     

     

    Thanks,

     

    Alex Webs
  • Hi,

     

     

    You have an article about how to evaluate performance of an iRule on a BIGIP: Click here

     

     

    Otherwise this script may be the best method to evaluate how many connections you have on a VS.

     

     

    HTH