[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Router twins



In many cases when we ask for a router with a given addr and port, we
really mean a router who knows a given key. By introducing the notion
of twins, we give routers extra flexibility in choosing the next hop in
the circuit: if some of the twins are down or slow, it can choose the
more available ones.

Matej: I'd like to be able to answer questions like
router_is_a_twin(router,addr,port) and router_get_best_twin(addr,port).
It seems that for the first one, we can just do a
router_get_by_addr_port() and then basically do a pkeycmp()? Since it's
just comparing memory, it should be reasonable speedy? Is there such a
function as pkeycmp? Down the road we can start collecting statistics on
connection performance, so eventually we can implement the get_best_twin
variant.

Paul: can you give some thought to the anonymity implications of this,
as we discussed earlier? (or others are free to jump in as well :)

--Roger