We should reconnect faster to our old peers on opennet.

Current reality:
We have 20 opennet peers (less if we have darknet connections). We use strict 
LRU, except that we have some heuristics for whether we can drop a node, 
which are designed to manage churn. We keep the last 50 opennet nodes we've 
connected to in a file called old-opennet-peers, but actually connecting to 
them is unusual, since only one side will be sending, and the other side only 
accepts if it has the capacity...

Proposal:
Keep a list of old-opennet-peers. Add to this list on disconnecting only if 1) 
the node wasn't dropped by LRU by either side, and 2) the node was eligible 
to be dropped - hence only add them if they were useful to us. Also have a 
time limit, perhaps a week. When we have free slots in the peers list, 
actively attempt to reconnect to these old nodes, by fetching their ARKs, and 
sending them packets.

I'm still not 100% sure about this ... any time we alllow old peers to 
reconnect, we're clobbering a slot which could have been used by a new 
destination sample. And the same applies in reverse - when we have a 
successful CHK request, we often have a new noderef to connect to. If we let 
the two compete on an equal footing I'm concerned it will be dominated by one 
or the other. Is this a reasonable concern? Could we ration it somehow? The 
nodes we are talking about have earned a position on the LRU list in the 
past ... Perhaps we could connect to them but not actually accept them as 
routable (both ways) until we have a free slot?

Logically, if we have a free slot, and we let one of our old-opennet-peers use 
it, that slot isn't lost - we know the peer was useful once. And it's been 
removed from the list. If it proves useful it may go back on the list, but it 
can only be re-added once it reconnects. So perhaps there isn't a problem on 
that side ... on the other side, we could well be crowded out by new 
connections, and offers of connections ...

We could perhaps be more slack about disconnected nodes - at the moment we 
give them 5 minutes to reconnect, during which time their slot is 
disconnected but not reusable.

Thoughts?? I have half a proposal here, it would be good to make it into a 
full proposal...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081205/50b625f6/attachment.pgp>

Reply via email to