uber / tchannel-node

MIT License
203 stars 40 forks source link

Improve the connection backoff logic. #330

Closed Raynos closed 8 years ago

Raynos commented 8 years ago

It looks like in production we backoff far too aggressively.

This is caused by having multiple concurrent tryConnect() attempts which will all "succeed" or "fail" and thus apply the doubling logic many times ballooning the retry attempt delay.

I've also added a hard gap of 30s backoff so every 30s we will try to open the connection.

r: @syyang

syyang commented 8 years ago

lgtm. thanks.

blampe commented 8 years ago

Does this need a test?

Raynos commented 8 years ago

We are going to test & verify this in production, will merge once verified.

Raynos commented 8 years ago

Verified in prod. Will land once green.