[Ingest Manager] Set the default timeout to 5 minute with a 20 seconds and improve rate limiter #79307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fix a few things we want to load test fleet on cloud.
Some context
The agent use a long polling request to wait for config change, it's configured to timeout after 5 minutes by default.
We have a rate limiter to control the rate where we deliver policy change to actions, I configured it to 5 policy per seconds by default.
Changes
The default timeout for long polling is now 5 minutes and we take a 20 seconds margin (instead of 3 previously) to have more chance to send the response before a socket idle timeout
Also the rate limiter is updated to drop
POLICY_CHANGE
that cannot be distributed in the next 5 minutes, the agent will get the change on the next checkin.