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

Add a timeout as a query parameter #494

Open
edeutsch opened this issue Oct 3, 2024 · 2 comments
Open

Add a timeout as a query parameter #494

edeutsch opened this issue Oct 3, 2024 · 2 comments

Comments

@edeutsch
Copy link
Collaborator

edeutsch commented Oct 3, 2024

Requested by Shervin on Architecture: https://docs.google.com/document/d/16agzJB0OlR8z-zU3nTivYYIo09sdayN-tu8lbrZyTXY/edit?pli=1

Previous discussion:
Shervin - Can we add the timeout as a query parameter into TRAPI?
Chris - ARAGORN can accept a timeout parameter. It assumes 5 minutes but will work longer if a longer parameter is sent.
Jackson - BTE does not support a timeout. It’s adjustable via environment parameters but not on the fly via a query.
Kaiwen - we do have a timeout parameter - unsure if it can be a TRAPI request parameter. Per Will it could be re-added.
Max - we are not expecting ARAs to accept a parameter. Can we make it a parameter so it’s not hardcoded? Can all the components be flexible?

@edeutsch
Copy link
Collaborator Author

edeutsch commented Oct 3, 2024

Possible addition to Query:

        max_allowed_time:
          type: integer
          default: 300
          description: >-
            Maximum number of seconds that the client is willing
            to wait for a response. If the service knows at query
            time that it cannot service the request within the
            specified time, it MAY respond with a 429 HTTP code.
            If the service discovers that it has taken more than the
            specified number of seconds while processing, it SHOULD
            return a 429 HTTP code.

Possible addition to AsyncQuery:

        max_allowed_time:
          type: integer
          default: 300
          description: >-
            Maximum number of seconds that the client is willing
            to wait for a response. If the service knows at query
            time that it cannot service the request within the
            specified time, it MAY respond with a 429 HTTP code.
            If the service discovers that it has taken more than the
            specified number of seconds while processing, it SHOULD
           post a Response to the callback with a status of "Timeout"
           and an entry in logs to indicate what happened.

@edeutsch
Copy link
Collaborator Author

edeutsch commented Oct 3, 2024

Note that web servers such as Apache, nginx have a settable parameter that is set to some timeout. We could never make a timeout longer than what the web servers are set for.

Based on the call Oct 3, there is no urgency on this and can wait official TRAPI 1.6 development.

consider putting all query control parameters like log_level, bypass_cache, max_allowed_time into a top-level container within Query and AsyncQuery

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

No branches or pull requests

1 participant