-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop loading the enitre node set into memory per tsh ssh connection
When doing a `tsh ssh node` the proxySubsys would load the entire set of nodes into memory to determine which server to route the request to. Under heavy load, like an automated bot that periodically spawns numerous session, a proxy could easily consume all available memory. To do prevent this, proxies now utilize a NodeWatcher, that maintains a single node set in memory. This prevents loading the nodes into memroy more than once, and also eliminates the need to unmarshal the types.Server on each retrieval of the nodes. The NodeWatcher only provides a GetNodes function that require a filter function to make it intentionally challenging to retrieve a copy of the entire node set.
- Loading branch information
1 parent
57cc2ed
commit 7f09c3f
Showing
16 changed files
with
450 additions
and
79 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
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
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.