Forum Discussion
Kevin_M_182964
May 21, 2015Nimbostratus
Is my persist record getting ignored?
I posted a similar question a few months back, but I still seem to be having trouble with using an iRule to manage persistence between clients and servers. Basically, the situation is the servers pr...
Kevin_M_182964
May 26, 2015Nimbostratus
I think I've figured out how to do it. Before I delete the persist record, I grab the node that the packet would have been sent to. After deleting the record, I force the packet to be sent to that node:
check if transaction is closed by PUT with ContentLength=0
if {[HTTP::method] equals "PUT" && [HTTP::header Content-Length] equals "0"} {
log local0. "[IP::client_addr]:[TCP::client_port], transactionID: $Transaction_ID method: [HTTP::method], length: [HTTP::header Content-Length], deleting existing persist record: [persist lookup uie $Transaction_ID]"
delete the persist record, then send packet to correct server
set server_addr [persist lookup uie $Transaction_ID node]
set server_port [persist lookup uie $Transaction_ID port]
delete the record
persist delete uie $Transaction_ID
send to server
log local0. "[IP::client_addr]:[TCP::client_port], forwarding transactionID: $Transaction_ID to $server_addr:$server_port"
node $server_addr $server_port
This seems to do the trick. I think there's still some risk that the same transaction ID could be used by both servers at the same time, but I don't see anyway around that.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects