-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RC] Optimize retrieval of raw target files in ClientGetConfigs
ClientGetConfigs suffered from the same problem that verification of the TUF repo suffered in that it attempts to retrieve raw target files one by one instead of in a batched operation. This manifests if an agent has a set of clients that causes it to receive a large number (50+) for a specific product. The problem is made worse if there are multiple clients requesting configs for that product, as it causes the ClientGetConfig calls to backup due to the fact the operation is gated by a mutex in the core service. This mutex also blocks the main refresh loop from running, which can result in clients timing out in the remote config backend and giving the appearance that the clients are not running remote config properly. The fix is to apply the same performance improvement that Verify received, figuring out the minimal set of target files we need to pull in advance, and then issuing a batch download operation to pull them all at once.
- Loading branch information
Showing
4 changed files
with
129 additions
and
85 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