Forum Discussion

Robert_Pagano_7's avatar
Robert_Pagano_7
Icon for Nimbostratus rankNimbostratus
Sep 25, 2006

how to ensure that 'client' requests which orginate from a load-balanced server are sent to itself by the load balancer

I'm not sure I understand why our apps people need this but here it is...

 

 

We have a pool of two servers (let's call them 'S1' and 'S2') which support an 'all-ports' virtual server ('VS').

 

 

Apparently, not only 'end-users' access the virtual server; the servers (which support the virtual server) themselves send requests to the virtual server.

 

 

The application owners have stated that they need requests which originate from the servers to be 'load-balanced' to the same server which made the request. In other words...

 

 

[A] S1 telnets to VS

 

[B] LTM gets the request and (should) send the connection to S1

 

 

Similarly, if S2 telnets to VS, the LTM should send the connection back to S2.

 

 

Presently, the VS is configured with the 'least-connections' load balancing algorithm; so S1's telnet request may or may not get sent to S1.

 

 

Is there a way to achieve this without disrupting the load-balancing of 'client' machines (which should continue to be load-balanced by the least-connections algorithm)?

 

 

We are running version 9.2.3 on 6400s.

 

 

Any help will be greatly appreciated.

 

 

Thank you.

 

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Rob -

    Here's a rule that will:

    1) send "normal" traffic to the pool

    2) sends "bounceback requests" (from real server to virtual server) to itself if it is UP

    3) sends bounceback requests to the pool if the requested server is not UP.
    when CLIENT_ACCEPTED {
      if { [matchclass [IP::remote_addr] equals $::serverIPs] }{
        if { [LB::status pool myPool member [IP::remote_addr] 23] ne "down"}{
          pool myPool member [IP::remote_addr] 23
        } 
      } else {
          pool myPool
      }
    }
    (substitute the real pool name and the correct port if it is not 23).

    Create a class (data group list) of IP addresses called serverIPs which contains the IP addressed of the servers in the pool, and apply the iRule to the virtual server.

    HTH

    /deb