|
|
|
|
|
by siquick
1911 days ago
|
|
Yes I'm sure it's down to the cold start issue of Lambda. Are there any tips on how to keep it warm? I didn't go down the static route as I have tens of thousands of product pages. Will check out the Incremental Static Generation - thanks. |
|
If you were using your own Lambda you could set a minimum reserved concurrency to avoid cold starts, but I don’t think Vercel gives you that level of control. The main thing to do is try to serve as much statically as possible so that it reads straight from the CDN cache or static file store and that way it never hits your Lambda on requests.
With ISR the Lambda updates the rendered file in the background, rather than in response to a request (generally), and the user is just served the last generated render. So in that scenario the Lambda latency is taken out of the equation.
If you know which products are most important you could also render a subset of them at build time and let the fallback handle the long tail ones.