Is Quarkus the magic bullet for Java and AWS Lambda?

When should I care about cold starts?

Enter Quarkus

  • Moves a lot of runtime work to build time
  • No JVM needed to run the software artifact (./application instead of application.jar)

Cold starts, Quarkus, Custom Runtimes, Graal what does it all mean?

Comparing 4 “flavors”

the four different “flavors” I will compare
  1. Node.js with Express backend framework
  2. Java 11 (Amazon Corretto) with Spring Boot backend framework
  3. Java 11 (Amazon Corretto) with Quarkus backend framework
  4. Code authored in Java with Quarkus then built with graalVM and deployed as native binary executable.
  • How long it takes for a fresh Lambda Execution environment to start (cold start)
  • How much memory is consumed on a cold start
  • Cold start vs. warm start (already initialized) Lambda execution time
average cold starts in milliseconds across runtimes with 256mb of ram configured

What’s going on with the “init” phase?

The JVM flavored Lambdas

the same table data depicted in previous image summed up in a chart
number of cold starts compared to warm starts over a few days

Response time for warm invocations

averages across the same time span as samples above. (duration is in milliseconds)

What about price ?

Why you wouldn’t use native-image

Conclusions: when I think you should and shouldn’t use Quarkus with Lambda

  • each Lambda function is very simple making it easy to understand and debug
  • a bug or venerability in one part of your app won’t effect the rest
  • you’re cold start times and memory use will improve drastically without having to do any hacks to the AWS Lambda golden path. (By golden path I mean the standard recommend AWS way)

Notes on what I deployed

--

--

--

I take things and make them serverless. Living in Greenpoint Brooklyn, employed as Developer @CedrusDigital. Opinions are my own.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Week 4

Ionic Q1 2022 Update Recap

Ionic Q1 2022 Update Splash Screen

Exception Handling in Java

Kotlin, SpringBoot and WebSockets

Top K Numbers

How I Solved a Challenging Concurrency Bug in Python

Artiom nauv 77193 §

Making a Pop-Up Window With Tailwind CSS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brian McCann

Brian McCann

I take things and make them serverless. Living in Greenpoint Brooklyn, employed as Developer @CedrusDigital. Opinions are my own.

More from Medium

How to Efficiently Scale AWS SQS to Process Millions of Messages Concurrently in Spring Cloud AWS…

Learning AWS with Localstack and Reactive Kotlin — A stamps and coins implementation

How to use Schema Registry Plugin with HTTPS enabled

Kubernetes, why YOU need to know about them!

Kubernetes Logo