4 ms·
As long as possible. Our jobs usually finish well within the limit but the top 1% hit the limit. One example we've been wrestling with is a merge operation. Us
by yeldarb 6y ago
As long as possible. Our jobs usually finish well within the limit but the top 1% hit the limit.
One example we've been wrestling with is a merge operation. Usually it's merging about 1000 records which completes in a few seconds. But every once in a while someone kicks off a job that tries to merge 1,000,000 records and it times out.
We want the benefits of serverless (scale down to zero, up to infinity at the drop of a hat) but these edge cases mean we're having to evaluate other options.
An hour or two would be a good start; then it'd cover 99.9% of requests. With a few hours we could add more nines :)
- BoorishBears 6y agoThat sounds like you need a queue of some sort
- dodobirdlord 6y agoIf your lambda function detects that it is going to hit the timeout you could have it launch a Fargate container to handle the long merge. Fargate is essentially a long-lived Lambda.
- mcintyre1994 6y agoIt’s also probably much easier to share code between those two implementations with the new container based lambdas :)