Forum Discussion
IheartF5_45022
Dec 08, 2013Nacreous
Try something like this;
- Enable oneconnect (it's the only way you can prevent the serverside connection from closing when the client connection closes)
- Set your pool member connection limit to 1
-
Add iRule (I do not know why the formatting below has not worked!);
when CLIENT_ACCEPTED {
if {$debug} {log local0. "[IP::remote_addr]:[TCP::remote_port]"} while {[table lookup "fProxyinProgress"] != ""} { if {$debug} {log local0. "Request in progress - wait 50ms"} after 50 } if {$debug} {log local0. "Setting flag for [IP::remote_addr]:[TCP::remote_port]"} table set "fProxyinProgress" "1" 1
}
when CLIENT_CLOSED {
if {$debug} {log local0. "Release flag[IP::remote_addr]:[TCP::remote_port]"} table delete "fProxyinProgress"
}
It's using the session table as a crude semaphore - crude because the waiting/setting operation (in CLIENT_ACCEPTED) really needs to be atomic to be foolproof.
Your clients would need to close each tcp connection each time they received a response for this to work (I don't know how that's going to sit with you), and you'd need to do some fairly serious tinkering with both the client and serverside tcp profiles.
Any suggestions from other devecentralers welcome!!