Forum Discussion

James_Yang_9981's avatar
James_Yang_9981
Icon for Altostratus rankAltostratus
Jul 03, 2010

Long Live TCP connection split

My customer has a new application that want do message based load balance, that the client only send messages, server will never response any information or packet. The requirment of it is :

 

 

1, F5 split each message to different instances of application.

 

2, Server side only have 4 fixed instance and will only receive 4 long live tcp connections.

 

3, more than 4 clients, it's about 8 or so to send messages.

 

4, server side connections will never disconnected, and 4 and only 4 connections to server side.

 

5, if client side connection is broken, server side connection will not broken or reset.

 

6, server is just accept packet, will not send any application level response.

 

7, server will only accept 4 fixed source port connection, like 9081,9082,9083,9084

 

 

I think the best choice here is uisng one connect profile + iRules to handle this case. I want do a testing aginst it. But I'm not sure if BIGIP working on one connection mode, how it determin the "idle" status of the server side connect. From the document Nat write about tunning oneconnect, I found BIGIP will determin the server side idle status depends on server side buffer is clear, but in this case, server will never response any information on application level. Does it also applicable to using the one connect irule?

 

 

From the sample irule about one connect working mode:

 

rule one_connect_rule {

 

when CLIENT_ACCEPTED {

 

TCP::collect

 

}

 

 

when CLIENT_DATA {

 

LB::detach

 

TCP::release

 

TCP::collect

 

}

 

}

 

 

pool test_pool {

 

members {

 

60.247.114.34:9000 {}

 

60.247.114.34:9001 {}

 

}

 

}

 

 

It only check the client data, does the irules is working on the customer environment? The message client send is less than 600byte and we can assume it will be end in one packet. I'm thinking about using server side connection limit to 4 to limit only 4 connection to server. But how to control the source port of 4 connections to server side?

 

  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account
    James

     

    I hope you got your answers.

     

     

    One connect profile should take care of most of the requirements.

     

     

    To make sure that the server accept the source port configure the virtual to Strictly preserve the source port.

     

     

    To make sure that the server only gets 4 connections, you can configure the pool member connection limit which is on a per CPU basis. Example, if you have a four CPU box specify limit of 1 to get only 4 connections to the server.

     

     

    If the pool member connection limit does not do the job contact me i will give you an irule to do it. I will be posting this irule to devcentral soon.

     

     

    John