frugal icon indicating copy to clipboard operation
frugal copied to clipboard

Improve Timeout Information For Server Time Budgeting

Open tomdeering-wf opened this issue 7 years ago • 3 comments

Today, a server can check the Timeout() on the FContext it receives in order to estimate how much time is left to serve the request. However, this can be a significant overestimate due to:

  1. Network latency
  2. Time spent sitting in the server's request buffer

It would be great if Frugal could add (1) a best-effort wall time when the client request was made, (2) the amount of time a message spent in the queue, or both. This would help Frugal servers make better estimates of the true client time budget.

tomdeering-wf avatar Apr 05 '17 18:04 tomdeering-wf

https://jira.atl.workiva.net/browse/MSG-448

stevenosborne-wf avatar Aug 08 '17 20:08 stevenosborne-wf

It seems like the two options here are:

  1. Have clients put a deadline in the FContext before they make a request (either in addition to or in replace of a relative timeout). One flaw here is clock drift from browser clients could be excessive
  2. Have the server deserialize the FContext, put a deadline in from the relative timeout, then reserialize the FContext (ignoring network latency, but would catch time in the queue).

brianshannan-wf avatar Sep 22 '17 15:09 brianshannan-wf

This is something we just ran into too

joshhayes-sheen-wf avatar Feb 13 '18 21:02 joshhayes-sheen-wf