Forum Discussion

Brian_Herr_1028's avatar
Brian_Herr_1028
Icon for Nimbostratus rankNimbostratus
Feb 13, 2007

Changing destination pool TCP port via iRules

 

Nickel tour: In order to change the destination port on a flow we have to define the pool, member, and port as the destination in the iRule. We need to be able to define the pool and port and let the load balancing choose the member.

 

 

 

Detailed explanation:

 

 

We need to change the destination port of a TCP flow before it hits a load balanced pool member using iRules. The first suggestion everyone has to this problem is to use a pool for each server port destination. The problem is that in our environment it would require thousands of pools. So the basic logic is this. Based upon data with in the TCP flow a lookup takes place against a data class. The goal is to pick a pool and have it choose the member based upon the pool definition and member/service availability and then change the destination port based upon the iRule. The data class can change based on business logic so on next connect the session could be moved to a different port or pool combination. All the documentation we have found points to one of these three scenarios:

 

 

 

1. Pool [pool_name] --> load balanced per pool definition

 

2. Pool [pool_name] member [member_name] --> specify a pool and a certain member w/ no intelligent load balancing or service checking

 

3. Pool [pool_name] member [member_name]:[port] --> specify a pool, a certain member and port w/ no intelligent load balancing or service checking

 

 

 

What we are looking for is a way to have the flexibility and features of the pool and yet change the destination port when it hits the pool member. And changing SNATs on the fly would not be a good solution. An example solution would be to set a variable that is the result of load balancing decision and then using that in the Pool [pool_name] member [dynamic_member_variable]:[port] statement. If someone knows how to do that let me know. The other option would be a feature enhancement for Pool [pool_name]:[port] or Pool [pool_name] member [some keyword for LB result]:[port]. The last suggestion everyone has is to do a round robin load balance in the rules. That is not fault tolerant so that is out the window as well. Our short term solution is to have a pool defined with members that have the ports changed and we manually load balance the flows and manually move traffic in case of server failures. This method defeats the purpose of an intelligent load balancer/front end processor.

 

 

Any ideas are greatly appreciated.

 

11 Replies