Forum Discussion

Rich_77667's avatar
Rich_77667
Icon for Nimbostratus rankNimbostratus
Jan 29, 2008

Single_TCP_Stream_HTTP_Round_Robin

Hello all,

 

 

I'm trying to write an iRule that allows a single tcp-80 connection to be round robin load balanced. So far I;ve tried the following:

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] contains "/DocumentManageWS/DocumentService.asmx" } {

 

pool Filenet-80

 

log local0. "using pool"

 

}

 

}

 

when LB_FAILED {

 

pool Filenet-80

 

LB::reselect

 

log "Selected server [LB::server] did not respond. Re-selecting node from Filenet-80"

 

}

 

 

 

Any assistance would be appreciated.

6 Replies

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    If you're just trying to set up basic RR load balancing, there's no need for an iRule at all. All you need to do is set up a VIP with a default pool whose load balancing method is set to Round Robin.

     

     

    Colin
  • Unfortunately the TCP stream is not reset after each transaction therefore it is continuous. Due to the nature of TCP being connection orientated, the F5 keeps sending traffic to a single server in the pool. The only way I have been able to load balance so far is to have the developer produce multiple TCP connections.
  • If you want LTM to parse each HTTP request over the same TCP connection for pool member selection and/or persistence info, you can enable OneConnect. Take a look at Deb's tech tip on OneConnect and let us know if you have any questions (Click here). As Colin suggested, you should be able to use a standard vip (with OneConnect) and pool without a rule to do this.

     

     

    Aaron
  • lsunder_88815's avatar
    lsunder_88815
    Historic F5 Account
    To add some clarification here:

     

    The client side is a server that has a single tcp connection to the VIP. Each GET or POST from the server to the VIP is a decrete "transaction" with no persistance required. With the continuous TCP connection between server and the VIP, the normal RR LB in the pool picks one member and sends all traffic to it. And what they would like is to have each GET or POST round robin load balanced to a different pool member.

     

    We were told this might be possible with an iRule. I've read through the "Huh? OneConnect? For my iRule?", but I'm not certain about it. Is it still a valid suggestion for this effort?
  • I think it is a valid suggestion based on this post from Unruley which Deb referenced in her OneConnect tech tip:

     

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&forumid=5&postid=10032

     

     

    ...the BIG-IP parses all requests as long as the HTTP profile is on the virtual (and not disabled). However, the serverside connection is maintained unless either OneConnect is enabled or a new pool is picked.

     

     

     

     

    So without OneConnect, LTM won't make a new load balancing decision after the first HTTP request when subsequent HTTP requests are made on the same TCP connection if the request will be sent to the same pool. How's that for a mouthful?

     

     

    Are you able to test with OneConnect?

     

     

    Aaron
  • lsunder_88815's avatar
    lsunder_88815
    Historic F5 Account
    Rich reported that he added the OneConnect profile and it appears to be round robin load balancing the requests from the single string.