Closed Raynos closed 9 years ago
:ok:
Good catch, I must've missed it while reviewing @ShanniLi 's recent work that we even added a direction argument down the pending weight path... this was always intended to be out only, pending in doesn't mean much from a peer selection standpoint.
also: lgtm, land it once tests green
:+1:
We had a bug in PreferIncoming where we "generalized" the direction too much.
We should always favor a peer with least outgoing because we want to measure and pick the peer with the lowest P99 latency which we are doing by least pending requests (i.e. more pending requests === bigger latency)
r: @jcorbin @kriskowal
cc @shannili