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

agent: ignore timeouts in list pending requests #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ojarjur
Copy link
Collaborator

@ojarjur ojarjur commented May 24, 2021

When the agent tries to list pending requests and there are no requests to return, there are two possible behaviors:

  1. The proxy stops waiting first and returns an empty list of request IDs.
  2. The agent stops waiting first and returns a timeout error.

For both of these scenarios, the right next steps are the same; the proxy agent should just keep polling for pending requests.

However, previously these were handled differently; in the first case the agent would poll again immediately, whereas the second it would log an error message and then use backoff logic to decide how long to wait until polling again.

This could be handled by simply configuring the agent with a longer timeout than the proxy server, but since the proxy agent and server might not be run by the same administrator, it is better to make the agent handle this scenario gracefully.

ojarjur added 2 commits May 24, 2021 14:51
When the agent tries to list pending requests and there are no requests to return, there are two possible behaviors:

1. The proxy stops waiting first and returns an empty list of request IDs.
2. The agent stops waiting first and returns a timeout error.

For both of these scenarios, the right next steps are the same; the proxy agent should just keep polling for pending requests.

However, previously these were handled differently; in the first case the agent would poll again immediately, whereas the second it would log an error message and then use backoff logic to decide how long to wait until polling again.

This *could* be handled by simply configuring the agent with a longer timeout than the proxy server, but since the proxy agent and server might not be run by the same administrator, it is better to make the agent handle this scenario gracefully.
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.

1 participant