filecoin-saturn / caboose

A blockstore for distributing load
Other
12 stars 2 forks source link

Consider dynamic context timeouts #43

Open willscott opened 1 year ago

willscott commented 1 year ago

@lidel suggests:

if CID fails due to context timeout, the next time it is requested, instead of timeout of 19s and 3 retries, spend full 60s on a single fetch to get some timeouts over the finish line.

As we transition to backend requests for variable-sized car files, we can potentially expect a common pattern of a head request to precede full requests, and that may help us understand the expected characteristics (and size) of the full request as well.

lidel commented 1 year ago

Given we now deal with variable-length CAR responses, we need more than a naive time bound how logn entire HTTP request should take.

We need dynamic timeout based on the time we've received new bytes (or new block) from L1. CAR fetch could take 30 minutes, but if after 2 minutes it stalls and stops sending me new bytes, I want to timeout after 1 minute, and not wait 28m until global request timeout kicks-in.