This repository has been archived by the owner on Aug 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: limit the number of cold calls we can do (#316)
* feat: limit the number of cold calls we can do * feat: add a backoff to blacklisting * refactor: make cold calls configurable * fix: make blacklist duration longer * fix: improve blacklisting * test: add some tests for queue * feat: add jitter to blacklist ttl * test: validate cold queue is removed * feat: purge old queues every hour * test: fix aegir post script node shutdown * fix: abort the cold call queue on manager abort * fix: improve queue cleanup and lower interval to 15 mins
- Loading branch information
Showing
7 changed files
with
340 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
BLACK_LIST_TTL: 120e3, // How long before an errored peer can be dialed again | ||
BLACK_LIST_TTL: 5 * 60 * 1e3, // How long before an errored peer can be dialed again | ||
BLACK_LIST_ATTEMPTS: 5, // Num of unsuccessful dials before a peer is permanently blacklisted | ||
DIAL_TIMEOUT: 30e3, // How long in ms a dial attempt is allowed to take | ||
MAX_PARALLEL_DIALS: 50 // Maximum allowed concurrent dials | ||
MAX_COLD_CALLS: 50, // How many dials w/o protocols that can be queued | ||
MAX_PARALLEL_DIALS: 100, // Maximum allowed concurrent dials | ||
QUARTER_HOUR: 15 * 60e3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.