Forum Discussion

Joe_Curl_105786's avatar
Joe_Curl_105786
Icon for Nimbostratus rankNimbostratus
Oct 25, 2013

Best Option

I have an application that needs me to select a pool based on the TCP port that it connects to the F5 on. (Server Port or Local Port) The number of ports that need to be tracked for each server can run into the thousands. My first idea was to use a data group and the switch command. The reason I wanted to go this way was because the switch command is suppose to be more efficient than the if statement. However, I have discovered that the switch command can not use data groups. So now I am considering going back to the if statements and use the data groups. The reason is because I believe using data groups will be a much more manageable option based on the number of TCP ports I have to account for. My basic question is do I lose much efficiency doing it this way or is there a better option out that I have not thought of yet. Thanks for any feedback.

 

Joe

 

4 Replies

  • How many pools are there? Perhaps some well chosen naming convention would help or a regex rather than a DG?

     

  • I am expecting the number of pools to be between 50 to 75 when then entire project is completed.

     

  • You don't have to use a switch command with a data group:

    when HTTP_REQUEST {
        if { [class match [TCP::local_port] equals my_dg] } {        
            pool [class match -value [TCP::local_port] equals my_dg]
        }
    }
    
  • Ok, the only reason I started down the switch path was because trying to keep the F5 performance optimal. Even though it is a small number of servers total it is a high volume of TCP small size packet traffic. Based on this I may go back and rework with the if statement and then use the data group. Thanks for you feed back on this.

     

    Joe