I’ve seen a few people wanting to compile Kotlin t...
# javascript
r
I’ve seen a few people wanting to compile Kotlin to node citing AWS cold start times - this article suggests there’s not much between node and JVM cold starts: https://mikhail.io/serverless/coldstarts/aws/ Do people have different experiences?
the question is whether the differences of ~ 0.5 sec have real impact on the user experience
r
The first article has been updated more recently and uses Java 11 rather than 8 as the runtime.
s
Here’s the main difference… presumably, in most cases you want to actually make a call to an AWS service. Well the JVM runtime doesn’t include the AWS SDK… you have to package it with your code. On the other hand, the nodejs runtime includes the AWS sdk. Even if you just use one service, the JVM AWS SDK imposes a huge size penalty (10MB+). And as the article correctly states, the size of the code has a huge impact on cold start times.
There are ways to improve this… the GraalVM can strip out unused code, and there are various ways to eliminate bits of startup time… but they can be error prone and time consuming. Maybe worth the time for a lambda that doesn’t change much, but that isn’t the norm in a lot of cases.