-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit count of HTTP channels with tracked stats (#77303)
Today we expire the client stats for HTTP channels 5 minutes after they close. It's possible to open a very large number of HTTP channels in 5 minutes, possibly inadvertently, and the stats for those channels can be overwhelming. This commit introduces a limit on the number of channels tracked by each node which applies in addition to the age limit, and makes these limits configurable via static settings. It drops the pruning of old stats when starting to track a new channel and instead uses a queue to expire the oldest stats when each channel closes if necessary to respect the count limit; it only performs age-based expiry when retrieving the stats, since the count limit now bounds the memory needed. Finally, it tightents up some missing synchronization and makes sure that we expose only immutable objects to the stats subsystem.
- Loading branch information
1 parent
fe72c53
commit 1045abe
Showing
10 changed files
with
700 additions
and
140 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
283 changes: 178 additions & 105 deletions
283
server/src/main/java/org/elasticsearch/http/HttpClientStatsTracker.java
Large diffs are not rendered by default.
Oops, something went wrong.
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.