Skip to content
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

Enable caching of agent readiness success #384

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

Anton-Kalpakchiev
Copy link
Collaborator

@Anton-Kalpakchiev Anton-Kalpakchiev commented Nov 21, 2024

As described in #371, the agent has a readiness endpoint, which checks its dependencies' readiness. This endpoint is already implemented. However, depending on usage, the endpoint might be called very frequently, which would result in many redundant checks being performed (for example if the endpoint is queried once per second). To address this, we are adding the ability to cache readiness success for a certain amount of time. If the endpoint is queried and succeeds, it will continue reporting success without making any readiness checks until the readiness cache TTL expires. The TTL is is configurable through the .yaml config. Failures are not cached.

  • Enable caching of agent readiness success

Copy link
Collaborator

@gkeesh7 gkeesh7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment, rest LGTM

agent/agentserver/server_test.go Outdated Show resolved Hide resolved
agent/agentserver/server_test.go Show resolved Hide resolved
agent/agentserver/server_test.go Show resolved Hide resolved
agent/agentserver/server_test.go Outdated Show resolved Hide resolved
@Anton-Kalpakchiev Anton-Kalpakchiev merged commit 1f6f59c into master Nov 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants