

In my experimentation, I’ve observed that Java and. In this context, we can clearly understand the reason why languages like NodeJS and Python have dazzling performances against cold starts.
JAVA COMPARE DURATIONS CODE
One of the biggest differences between compiled and interpreted languages is that interpreted languages need less time to analyze source code but the overall time to execute the process is much slower. But Go has the 3rd fastest cold start duration even though it has a big size like 4.7MB. We can generally accept this for the different runtimes except for Java And Go. I acknowledge that the package size has a proportional effect on cold start durations for the same runtimes. It looks like they are almost not affected by cold start and invocations always run instantly. We see dazzling performance results in Python and NodeJS runtimes. Go has approximately 400ms long cold start duration but invocation time goes down and invocations start to happen instantly after cold start. Let's look from a different perspective by excluding Java and take a closer look at the other runtimes. Net has a much better cold start performance than Java even if both are compiled languages. In contrast to that, the interpreted languages have almost no performance difference between when they hit the cold start and for their later invokes. Java has the highest cold start duration with approximately 5.000 milliseconds. All of the functions’ average invocation times are shown below:Ĭompiled languages’ cold start durations are significantly greater than the others but their max durations get closer to the others after warming up. So filtering the functions with the runtimes and average durations would be enough for us to create the “Max durations” widget. In this scenario, we only deployed the stack that contains the latest versions of runtimes. For more information check APM docs from here or sign up for Thundra from here Let’s check the differences between runtimes by building widgets in a custom dashboard in Thundra APM. Integrated functions already exist in the Github repository>, you can easily clone the repo and change the Thundra API Key with yours in SAM templates. To compare these functions dynamically, the newly introduced Thundra APM’s custom dashboard widget is a pretty proper choice. You can check the complete deployment package from this Github repository.

When we compare them first we will use the latest versions of the runtimes the AWS SAM provided us. We are using simple hello world functions to test invocation times of Lambdas’ by using the AWS SAM templates. In this article, we will compare the performances of the same hello world Lambda functions written in Java, Go, NodeJS. SummaryĪWS Lambda is a compute service that lets you run code without any infrastructure management and it natively supports Java, Go, NodeJS. This article is updated on April 2022 with a comparison between DotNet-3.1 and DotNet-6 performance.
