{"action":"created","issue":{"url":"https://api.github.com/repos/uber/tchannel-node/issues/309","repository_url":"https://api.github.com/repos/uber/tchannel-node","labels_url":"https://api.github.com/repos/uber/tchannel-node/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel-node/issues/309/comments","events_url":"https://api.github.com/repos/uber/tchannel-node/issues/309/events","html_url":"https://github.com/uber/tchannel-node/pull/309","id":141138757,"number":309,"title":"peer: add tryConnect() with backoff","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-16T00:47:24Z","updated_at":"2016-03-16T20:25:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uber/tchannel-node/pulls/309","html_url":"https://github.com/uber/tchannel-node/pull/309","diff_url":"https://github.com/uber/tchannel-node/pull/309.diff","patch_url":"https://github.com/uber/tchannel-node/pull/309.patch"},"body":"There is an edge cases where the peer selection logic as\npart of `minConnections` might try and open a lot of connections.\n\nThis can be quite expensive in terms of CPU & logging.\n\nThis change adds exponential backoff to trying to open a connection\non an unconnected peer when we have less connected peers then\nminConnections.\n\nThere might be a scenario where you have minConnections: 4 and\nnumPeers: 5, except two of 5 peers are down. In that scenario\ntchannel would try and open a lot of connections to the down\npeers even though it should know that they are down.\n\nThe more general solution to this is remember whether a peer\nis healthy or not.\n\nr: @jcorbin @rf @kriskowal"},"comment":{"url":"https://api.github.com/repos/uber/tchannel-node/issues/comments/197531933","html_url":"https://github.com/uber/tchannel-node/pull/309#issuecomment-197531933","issue_url":"https://api.github.com/repos/uber/tchannel-node/issues/309","id":197531933,"user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T20:25:25Z","updated_at":"2016-03-16T20:25:25Z","body":"@jcorbin \r\n\r\nI think this feature is very different from intervalScan. What I want here is backoff. I want to avoid continuously trying to connect to a dead peer.\r\n\r\nThe general implementation of this is health management and probing in the unhealthy state and backoff on the probing."}}