Forum Discussion

Ganesh_Balasubr's avatar
Icon for Nimbostratus rankNimbostratus
May 22, 2012

Redirect to different pool based on no.of connection

I've a very simple environment. Pool A with two nodes and Pool B with Nodes. Then created a Global Pool and added Pool A and Pool B.



Created a Virtual IP and added Global Pool as Default pool with Round Robin method. Though I'm seeing connection going between two pools, not sure at what order this is being moving. I want to create a rule, which is like first 10 connection goes to POOL A and next to POOL B in other words, every 10 connection should switch between the pools.



I want to test our application behavior when the connection is bounced back and forth between different nodes. I need help to create an irule for this scenario?


1 Reply

  • Hi Ganesh,

    You can set the Connection Limit on the Servers (within the Pool) and then monitor the situation with the iRule call. A server reaching its connection limit is the same as the server going temporarily unavailable / down from the perspective of the LTM, so it will act accordingly.

    This is an example that you can see in action:

    when HTTP_REQUEST {
    if { [active_members http_poo_name] == 0 } {
    log local0. "Connection Limit Reached / No pool members available."

    NOTE / WARNING: This is Connection Based, NOT Session. So you could see some strange behavior because of this. Most browsers will automatically spin up 1-5 threads / TCP Connections to an individual site to retrieve the content quicker, so you could run into a situation where some requests from the same user could be in one pool (or subject to whatever action you specify) and other requests could go to another pool.

    I would suggest setting your server connection limit low and testing the behavior that you are wanting to implement (you may find that you are going to want to seek out an alternative).

    Hope this helps.