[Concept] Disconnect Policies Hi,
Currently Phex has individual disconnect policies, which are off by default.
This means, that it routes all packets, and if a "greedy" client connects, that client can severly decrease our own search performance.
To gather ideas how to change this (and talk about if it's needed), I want to add the following idea as starting point for discussion:
So I think it would be useful to instead try to "get into a part of the network we can manage".
A possible way to archieve that is the following set of disconnect policies: Drop single congested outgoing connections
If only one outgoing connection is severly congested, disconnect it.
Metric: outgoing dropped % / mean outgoing dropped percentage.
used parameters:
dropped_threshold: below this threshold, no connection gets dropped.
dropped_ratio_threshold: How much the ratio of a single connection must be below the mean ratio to drop a connection.
close the single connection if
- outgoing drop % > dropped_threshold, AND
- outgoing drop % / mean outgoing drop % > dropped_ratio_threshold
example values are:
dropped_threshold: 30%
dropped_ratio_threshold: 3
The result of this is, that a single too weak link gets closed, so we don't batter too weak nodes.
If only one node drops packets, this node gets removed, if it reaches the dropepd_threshold. On general congestion, drop the most greedy incoming connection
If the mean dropped ratio rises above a threshold (and only then), check all incoming connections and close the one with the highest dropped %.
(is it possible to only count incoming packets we have to forward?) Target overall effect
The goal is to have Phex move itself automatically towards other nodes who have similar bandwidth requirements.
Slow nodes group themselves around other slow nodes, and greedy nodes get pushed out automatically, but only when they begin to harm the network (no need to do unnecessary policing - as long as it doesn't harm the network the node with the highest incoming packet rate may well be the best source for Query Replies).
Since all used values are accessible from the network tab, I assume that Phex already has all necessary information.
What do you think about the idea? |