parseable icon indicating copy to clipboard operation
parseable copied to clipboard

Fix LB timeout in `QueryServer`

Open vishalkrishnads opened this issue 1 year ago • 0 comments

Description

The query server takes quite a while to process incoming requests. But, most load balancers timeout before the computation can be completed.

As a temporary fix, this PR configures the query handler to send a one byte HTTP 202 response after waiting for P_PROXY_TIMEOUT - 5 seconds if the computation hasn't finished. The client can then reach back out with the same query after a while. If the results are ready, the server responds, or it times out again. The result persists in the cache and can be reused for the same query later.


This PR has:

  • [ ] been tested to ensure log ingestion and log query works.
  • [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • [x] added documentation for new or modified features or behaviors.

vishalkrishnads avatar Aug 20 '24 07:08 vishalkrishnads