Closed ShanniLi closed 8 years ago
so xlate egress should specify PreferOutgoing, since it only make outbound calls?
We’ll also need preferIncoming for service channels speaking to Hyperbahn, so they favor connections from their affine nodes. The eventual API should be preferConnectionDirection: 'incoming' | 'outgoing' | null
to avoid weird cases like preferIncoming: true, preferOutgoing: true
. Other than that, this looks solid.
@anson627 xlate egress is a hyperbahn service, right? If so, it should prefer incoming.
We should add some tests.
test('prefer outgoing creates new conn even if incoming');
test('prefer any re-uses incoming conn and does not open outgoing conn');
The main aim of tests is:
lgtm
r @jcorbin @kriskowal @Raynos
Tested with Ringpop and observed the 2x connection issue gone.