-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cherry-pick #19181 to 7.x: Cache error responses for cloudfoundry apps metadata #19638
Conversation
Cache error responses when requesting Cloud Foundry apps metadata to avoid hitting continuously the API when there are missing applications. (cherry picked from commit 9c0b63d)
Pinging @elastic/integrations-platforms (Team:Platforms) |
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cherry-pick of PR #19181 to 7.x branch. Original message:
What does this PR do?
Cache error responses when requesting Cloud Foundry apps metadata to
avoid hitting continuously the API when there are failures.
The original motivation for this change was to handle
AppNotFound
errors,but the truth is that continuously retrying on any error is not very good, so
this change effectively introduces a delay between retries on any error from
the API. It looks safer by now. We can reconsider this in the future if we see
that some other error should be handled in a different way.
An specific flag
cache_retry_delay
is also added to configure how long Beatsshould wait before retrying again in case of error.
Why is it important?
Sometimes events are received for apps that cannot be found on the API, on
these cases Beats continuously hit the API to try to get the metadata. This
provokes unnecessary load on API servers of big deployments.
Checklist
I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.