Open onema opened 4 years ago
I believe we can add provisioned concurrency as an option along with autowarming.
To be honest, right now we are experimenting with GraalVM and the results are very promising. https://ktor.site.kotless.io
takes 3 ms for the cold start. I hope that Kotless would be able to provide simple interface to GraalVM compilation and in that case cold start would not be a problem at all.
Meanwhile you can disable autowarm manually and add a custom Terraform file https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_provisioned_concurrency_config
EDIT: can't actually use that since the lambda function is not published...
Background
Cold starts and Java functions have always been a bad combo.
A scheduled auto warmer does not fully resolve the issue of cold starts. Concurrent calls will still see cold starts despite the warmer, and may only be helpful for functions that seldom get called. Furthermore having an auto warmer on by default is un-expected and in some instances undesirable.
It would be better to replace the Autowarmer with Provisioned Concurrency which is a lambda feature.
Summary of the feature request