Thawing Java on AWS Lambda: Reducing Cold Start Times from 11 Seconds to 1 episode artwork

EPISODE · Jun 9, 2024 · 45 MIN

Thawing Java on AWS Lambda: Reducing Cold Start Times from 11 Seconds to 1

from Serverless Sorcery · host Renaldi Gondosubroto

Are your Java cloud functions too slow? What if they could start in milliseconds instead of seconds? And use less memory to boot? This is not a dream, but by changing the way we compile our Java functions we can significantly reduce memory usage while also drastically improving startup performance. Java has never been a perfect fit for Function as a Service platforms such as AWS Lambda or Azure Functions. While both platforms have official support for Java, Java functions unfortunately suffer from significantly longer cold start times than many other runtimes. In this episode we talk through a simple Spring Cloud Java function running on AWS Lambda with fairly horrible cold start times of around 6 seconds and then compare a few different approaches for significantly improving it. Eventually ending up with a cold start time of just 100 milliseconds - making Java a viable, though not without drawbacks, choice for FaaS platforms.

Are your Java cloud functions too slow? What if they could start in milliseconds instead of seconds? And use less memory to boot? This is not a dream, but by changing the way we compile our Java functions we can significantly reduce memory usage while also drastically improving startup performance. Java has never been a perfect fit for Function as a Service platforms such as AWS Lambda or Azure Functions. While both platforms have official support for Java, Java functions unfortunately suffer from significantly longer cold start times than many other runtimes. In this episode we talk through a simple Spring Cloud Java function running on AWS Lambda with fairly horrible cold start times of around 6 seconds and then compare a few different approaches for significantly improving it. Eventually ending up with a cold start time of just 100 milliseconds - making Java a viable, though not without drawbacks, choice for FaaS platforms.

NOW PLAYING

Thawing Java on AWS Lambda: Reducing Cold Start Times from 11 Seconds to 1

0:00 45:15

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Frequently Asked Questions

How long is this episode of Serverless Sorcery?

This episode is 45 minutes long.

When was this Serverless Sorcery episode published?

This episode was published on June 9, 2024.

What is this episode about?

Are your Java cloud functions too slow? What if they could start in milliseconds instead of seconds? And use less memory to boot? This is not a dream, but by changing the way we compile our Java functions we can significantly reduce memory usage...

Can I download this Serverless Sorcery episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!