Forum Discussion
Persistence issue with TCP
- Dec 29, 2017
Ok, I finally fix it ^^
The issue was because I created a pool with 4 members, 2 same IP but different service port, cause we have 2 versions who using different socket
And I have 2 Virtual Services different (based on version) with an iRule different for each in order to select specific node with the target port. The irule was like this :
when CLIENT_ACCEPTED { set xxx_node1 "13.x.x.183" set xxx_node2 "40.x.x.221" set xxx_ppol "pool_vm_xxx_prod" set xxx_port yyyy if { ([LB::status pool $xxx_ppol member $xxx_node1 $xxx_port] eq "up") and ([LB::status pool $xxx_ppol member $xxx_node2 $xxx_port] eq "up") } { node $xxx_node1 $xxx_port node $xxx_node2 $xxx_port } elseif { ([LB::status pool $xxx_ppol member $xxx_node1 $xxx_port] eq "up") and ([LB::status pool $xxx_ppol member $xxx_node2 $xxx_port] eq "down") } { node $xxx_node1 $xxx_port } elseif { ([LB::status pool $xxx_ppol member $xxx_node1 $xxx_port] eq "down") and ([LB::status pool $xxx_ppol member $xxx_node2 $xxx_port] eq "up") } { node $xxx_node2 $xxx_port } else { log "Error : Pool $xxx_ppol is down" }
}
Finally, I just recreate 2 new pool specific to each version and on my 2 VS I associate this new pool based on target version and deleted the associated iRule.
And now, my traffic is correctly load balanced 😉
Thanks to all who help me in this situation
Have a nice day, Regards Alex
Hi
Thank you for your response. The protocol used is a no-known, developed by a company (based on tcp socket). So I’m not sur how to reply you about l7 on this traffic.
But if I understand what you mean, I don’t have to use a VS with a standard type, correct ?
Ok, basically as you already figure out, source address persistence will not work in your case. So you need to look something in the upper layers. If you were using HTTP for example, cookie persistence would easily fix the problem.
 
Here is the list of persistence profile for 13.1.0:
 
 
If the others persistence profiles can't be used, you can collect the TCP data, and use something in the TCP payload that uniquely identifies each user, and use that for persistence with universal persistence.
 
See this link for universal persistence:
 
https://support.f5.com/csp/article/K7392
 
See these links about TCP collect and TCP payload:
 
https://clouddocs.f5.com/api/irules/tcp__collect.html
 
https://clouddocs.f5.com/api/irules/tcp__payload.html
 
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com