My team noticed some timeouts in our own company's endpoints that were caused by Statsig flushes taking too long. Our endpoints are serverless, so the flush needed to take place before we could send a response, which terminates the process. 10 seconds was way too long, but without a backoff parameter we were unable to do anything about it, or even disable retries if we wanted to. Our best alternative was using Promise.race to terminate if flushing was taking too long, but that seemed like a hack, and would still mean adding 10 seconds to our response times for a single retry. This is a non-breaking change that solves our problem, and will hopefully be useful for other Statsig users too.
My team noticed some timeouts in our own company's endpoints that were caused by Statsig flushes taking too long. Our endpoints are serverless, so the flush needed to take place before we could send a response, which terminates the process. 10 seconds was way too long, but without a backoff parameter we were unable to do anything about it, or even disable retries if we wanted to. Our best alternative was using Promise.race to terminate if flushing was taking too long, but that seemed like a hack, and would still mean adding 10 seconds to our response times for a single retry. This is a non-breaking change that solves our problem, and will hopefully be useful for other Statsig users too.