hector-client/hector — pull request #588 by dmdevito (2013-02-21 13:52:44+00:00)
Title: provide a way to cut idle connection (to reopen it) before the firewall,...

... so that the connection we get is always ops

I wrote (days ago) I would dig into the firewall pb to propose some code. Here is my patch:

There is 2 ways to tackle the firewall pb:
1) after the firewall (idle) connection cut: the pb is to detect any connection known by Hector, but already cut by the firewall. It could be hard to detect them as, for example, one has to find any Java exception raised by this cut to catch it, or (more generally) to detect all the possible effects (into the hector code) of this cut.

2) before the firewall (idle) connection cut: we know the firewall is going to cut idle connection. So the strategy, here, is to renew connection within hector code, to avoid to use a connection that could be already cut by the firewall.

For example, in the 2) case, if the firewall cuts a connection after an idle period of 30 mn, one could configure hector to renew connections after an idle period of 29 mn 30 s (to have a 30s period margin). Then, hector would never use a connection already cut by the firewall.