For those of you wondering what the heck we're talking about: these are parameters that clients read from the consensus that help clients choose paths in a way that is globally optimal for load balancing.
The idea stems from the realization that relays that can handle exiting are going to get a lot of load already by clients who choose those relays as the final hop in their circuit, so clients should avoid picking them in *other* hops of their circuits, because that would just overload them even more. More info here: https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n2434 https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n3045 https://gitweb.torproject.org/torspec.git/tree/proposals/265-load-balancing-with-overhead.txt You can see the current weights in your consensus file: search for the "bandwidth-weights" line. Ok. With that introduction, here we go: On Wed, Jan 02, 2019 at 09:47:14AM +0800, Lucon Yang wrote: > As we know, some weight params are applied to router bandwidths during path > selection. In the process of computing node weight, I find the the > consensus' "bwweightscale" param and the exit position related > params(eg.Weg,Wem,Wee,Wed) are all set to '10000', which results in every > node has the same weight value of 1. That means node's flag, such as > 'Exit','Guard','V2dir', doesn't have effect on choosing the exit node.So I > want to ask what's the reason of the design like this? I admit I've always found the per-position weightings logic to be a bit of a mystery, but I believe the answer here is that these weights are applied *in addition to* the individual weights for the relays, and the goal of these weights is to give clients a chance to avoid using relays in circuit positions that aren't globally optimal for the network. With the current relays in the network, exit capacity is scarce. So the current values for the weights mean that if a client is considering a given relay for whether it should be the exit relay in their circuit, its chance of being used as the exit relay should not be reduced. Or said another way, these weights mean that if a client is thinking of picking that relay as its exit, it's fine to do. Compare this situation to Wgd - Weight for Guard+Exit-flagged nodes in the guard Position That weight means that if a client is thinking of picking a relay for its Guard position, and the relay has both the Guard flag and the Exit flag, then it should adjust its chance of picking that relay by that factor. In this case, since Wgd is 0 in the current consensus, it should adjust its chance down to 0, meaning that clients will skip over relays with both the Guard flag and the Exit flag when they're picking a relay for the guard position (first hop) of their circuit. In an alternate world where the Tor network had plenty of spare exit capacity, the "Weg,Wem,Wee,Wed" weights might be less than 10000, which would instruct clients to choose these various kinds of relays less often for the Exit position, because the relays would presumably already be getting other load from being chosen by other clients for non-exit positions. Hope this explanation helped rather than making things worse :) --Roger -- tor-talk mailing list - [email protected] To unsubscribe or change other settings go to https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
