SlideShare a Scribd company logo
Adopting Java for the
Serverless world
from the perspective of the AWS developer
Vadym Kazulkin, ip.labs, JAX , 05 Mai 2022
Contact
Vadym Kazulkin
ip.labs GmbH Bonn, Germany
Co-Organizer of the Java User Group Bonn
v.kazulkin@gmail.com
@VKazulkin
https://www.linkedin.com/in/vadymkazulkin
https://www.iplabs.de/
ip.labs
https://www.iplabs.de/
Java popularity
https://redmonk.com/rstephens/2021/08/05/top-20-june-2021/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS and Serverless
2020 Magic Quadrant for Cloud Infrastructure & Platform Services
https://pages.awscloud.com/GLOBAL-multi-DL-gartner-mq-cips-2020-learn.html?pg=LWIAWS
https://aws.amazon.com/de/resources/analyst-reports/gartner-mq-cips-2021/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
The State of Serverless 2021
https://www.datadoghq.com/state-of-serverless/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
The State of Serverless 2021
https://www.datadoghq.com/state-of-serverless/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Life of the Java Serverless developer on
AWS
AWS Java Versions Support
• Java 8
• With extended long-term support
• Java 11 (since 2019)
• Only Long Term Support (LTS) by AWS
• Current LTS Java version is Java 17
• Amazon Corrett Support for 17 is released, but not currently available for
Lambda
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://aws.amazon.com/de/corretto/
Java ist very fast
and mature
programming
language…
Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea
… but Serverless
adoption of Java
looks like this
Vadym Kazulkin @VKazulkin , ip.labs GmbH
2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers
https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
Vadym Kazulkin @VKazulkin , ip.labs GmbH
The State of Serverless 2021
https://www.datadoghq.com/state-of-serverless/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Developers love Java and will be happy
to use it for Serverless
But what are the challenges
Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS Lambda Basics
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Creating AWS Lambda with Java 1/3
:
Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
Creating AWS Lambda with Java 2/3
:
Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
Creating AWS Lambda with Java 3/3
:
Source https://docs.aws.amazon.com/lambda/latest/dg/java-context.html
AWS Lambda Price Model
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Cost for Lambda
REQUEST DURATION
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Request Tier
$ 0.20
Per 1 Mio Requests
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Duration Tier
$ 0.00001667 (x86)
$ 0.00001333 (Arm)
Per GB-Second
Vadym Kazulkin @VKazulkin , ip.labs GmbH
GB-Second
ONE SECOND ONE GB
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Example
• 1 Mio requests
• Lambda x86 with 512MiB
• Each lambda takes 200ms
0.5 GiB * 0.2 sec * 1 Mio
= 100 000 GB-Seconds
Requests:
$0.20
GB-Seconds:
$1.67
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Challenge Number 1 with Java is a
big cold-start
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://www.serverless.com/blog/keep-your-lambdas-warm
Cold Start
:
Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications
• Start Firecracker VM
• AWS Lambda starts the JVM
• Java runtime loads and initializes
handler class
• Static initializer block of the handler class is
executed
• Init-phase has full CPU access up to 10 seconds for
free for the managed execution environments
• Lambda calls the handler method
• Full CPU access only approx. at 1.8 GB “assigned”
memory to the function
Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications
Michael Hart: „Shave 99.93% off your Lambda bill with this one weird trick“ https://hichaelmart.medium.com/shave-99-93-off-your-lambda-bill-with-this-one-weird-trick-33c0acebb2ea
Function lifecycle- a full cold start
Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications
AWS Lambda cold start duration
per programming language
Source: Mikhail Shilkov: „AWS Lambda: Cold Start Duration per Language. 2020 edition” https://mikhail.io/serverless/coldstarts/aws/languages/
Cold start duration with Java
• Below 1 second is best-case cold start duration for very simple Lambda
like HelloWorld with no dependencies
• It goes up significantly with more complex scenarios
• Instantiation outside of the handler method (static initializer block) to
communicate with other (AWS) services (e.g. DynamoDB, SNS, SQS, 3rd party)
• Artifact size
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
AWS Lambda cold starts by memory size,
runtime and artifact size
Source: Mike Roberts "Analyzing Cold Start latency of AWS Lambda" https://blog.symphonia.io/posts/2020-06-30_analyzing_cold_start_latency_of_aws_lambda
Artifact Size:
• Small zip (1KB)
• Large zip (48MB)
• Large uberjar (53MB)
Cold start duration with Java
• Below 1 second is best-case cold start duration for very simple Lambda
like HelloWorld with no dependencies
• It goes up significantly with more complex scenarios
• Instantiation outside of the handler method (static instantiation) to communicate
with other (AWS) services (i.e. DynamoDB, SNS, SQS, 3rd party)
• Artifact size
• To minimize the cold start time apply best practices from this talk
• Worst-case cold starts can be higher than 10 and even 20 seconds
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
• Switch to the AWS SDK 2.0 for Java
• Lower footprint and more modular
• Allows to configure HTTP Client of your choice (i.e. Java own Basic HTTP Client or
newly introduced AWS Common Runtime async HTTP Client)
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Zoe Wang: „Introducing AWS Common Runtime HTTP Client in the AWS SDK for Java 2.x”
https://aws.amazon.com/de/blogs/developer/introducing-aws-common-runtime-http-client-in-the-aws-sdk-for-java-2-x/
S3AsyncClient.builder()
.httpClientBuilder(AwsCrtAsyncHttpClient.builder()
.maxConcurrency(50))
.build();
Best Practices and Recommendations
• Less (dependencies, classes) is more
• Include only required dependencies (e.g. not the whole AWS SDK 2.0 for Java, but the
dependencies to the clients to be used in Lambda)
• Exclude dependencies, which you don‘t need at runtime e.g. test frameworks like Junit
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
<version>2.10.86</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.10.86</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Best Practices and Recommendations
• Initialize dependencies during initialization phase
• Use static initialization in the handler class, instead of in the handler method (e.g.
handleRequest) to take the advantage of the access to the full CPU core for max 10 seconds
• In case of DynamoDB client put the following code outside of the handler method:
AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()...build();
DynamoDB dynamoDB = new DynamoDB(client);
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Best Practices and Recommendations
Provide all known values (for building clients i.e. DynamoDB client) to
avoid auto-discovery
• credential provider, region, endpoint
AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()
.withRegion(Regions.US_WEST_2)
.withCredentials(new ProfileCredentialsProvider("myProfile"))
.build();
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Best Practices and Recommendations
Best Practices and Recommendations
Using Tiered Compilation
• Achieve up to 60% faster startup times can use level 1 compilation with
little risk of reducing warm start performance
Mark Sailes: "Optimizing AWS Lambda function performance for Java”
https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-function-performance-for-java/
Avoid:
• reflection
• runtime byte code generation
• runtime generated proxies
• dynamic class loading
Use DI Frameworks which aren‘t reflection-based
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Best Practices and Recommendations
Strive for cost optimization
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Best Practices and Recommendations
Cost for Lambda
REQUEST DURATION
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Cost scales
linearly with
memory
Vadym Kazulkin @VKazulkin , ip.labs GmbH
More memory = more expensive?
Kazulkin @VKazulkin , ip.labs GmbH
Lambda Power Tuning 1/2
• Executes different
settings in parallel
• Outputs the optimal
setting
Image: https://github.com/alexcasalboni/aws-lambda-power-tuning Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda Power Tuning 2/2
• Executes different
settings in parallel
• Outputs the optimal
setting
Image: https://github.com/alexcasalboni/aws-lambda-power-tuning
Alex Casalboni: “Deep dive: finding the optimal resources allocation for your Lambda functions“
https://dev.to/aws/deep-dive-finding-the-optimal-resources-allocation-for-your-lambda-functions-35a6
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Optimizing AWS Lambda cost and
performance using AWS Compute
Optimizer
Source: Chad Schmutzer „Optimizing AWS Lambda cost and performance using AWS Compute Optimizer”
https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-cost-and-performance-using-aws-compute-optimizer/
Cost optimization
• Java is well optimized for long running server applications
• High startup times
• High memory utilization
Vadym Kazulkin @VKazulkin , ip.labs GmbH
And both memory and execution time are cost dimensions,
when using Serverless in the cloud
GraalVM enters the scene
Source: https://www.graalvm.org/
GraalVM
Goals:
Low footprint ahead-of-time mode for JVM-based languages
High performance for all languages
Convenient language interoperability and polyglot tooling
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
GraalVM
Architecture
Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf
„The LLVM Compiler Infrastructure“ https://llvm.org/
SubstrateVM
Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript”
https://www.youtube.com/watch?v=a-XEZobXspo
GraalVM on SubstrateVM
A game changer for Java & Serverless?
Java Function compiled into a native executable using
GraalVM on SubstrateVM reduces
• “cold start” times
• memory footprint
by order of magnitude compared to running on JVM.
And both memory and execution time are cost dimensions,
when using Serverless in the cloud
GraalVM on SubstrateVM
A game changer for Java & Serverless?
Current challenges with native executable using GraalVM :
• Most Cloud Providers (AWS) doesn’t provide GraalVM as Java
Runtime out of the box, only Open JDK (i.e. AWS provides
Corretto)
• Some Cloud Providers (e.g. AWS) provide Custom Runtime
Option
Custom Lambda Runtimes
GraalVM Complitation Modes
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
AOT vs JIT
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
GraalVM Native Cold Start 2021
Source: Aleksandr Filichkin: "AWS Lambda battle 2021: performance comparison for all languages (cold and warm start)“
https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1
Support of GraalVM native images in
Frameworks
Spring Framework: GraalVM native image support in Beta without
requiring additional configuration
Spring Boot: Ongoing work on experimental Spring Graal Native
project.
Quarkus: a Kubernetes Native Java framework developed by Red
Hat tailored for GraalVM and HotSpot, crafted from best-of-breed
Java libraries and standards.
Micronaut: a modern, JVM-based, full-stack framework for building
modular, easily testable microservice and serverless applications.
Common principles for all Frameworks
• Rely on as little reflection as possible
• Avoid runtime byte code generation, runtime generated proxies and
dynamic class loading as much as possible
• Process annotations at compile time
• Compatible with Spring‘s annotations
• The common goals:
• increase developer productivity
• speed up start up times and decrease memory usage for Microservice and
Serverless Java applications
• with and without usage of GraalVM and native image
Steps to deploy to AWS
• Installation prerequisites
• Framework of your choice (Micronaut, Quarkus, Spring)
• GraalVM and Native Image
• Apache Maven or Gradle
• AWS CLI and AWS SAM CLI (or SAM local for local testing)
• Build Linux executable of your application with GraalVM native-image
• Use Maven or Gradle plugin (if available)
• Deploy Linux executable as AWS Lambda Custom Runtime
• Function.zip with bootstrap Linux executable
Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS Lambda Deployment of Custom
Runtime with SAM
Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
Example
Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
Micronaut Framework
Source: https://micronaut.io/
Micronaut Additional Features
• Custom Validators
• AWS API Gateway integration
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
Micronaut® AOT: build-time optimizations
for Micronaut applications
Micronaut AOT is an extension to the Micronaut Framework which is the
foundation to many optimizations that can be implemented at build time
but weren’t possible solely with annotation processing.
By effectively analyzing the deployment environment, AOT is capable of
reducing startup times or distribution size for both native and JVM
deliverables.
Source: “Introducing Micronaut® AOT: build-time optimizations for your Micronaut applications”
https://medium.com/graalvm/introducing-micronaut-aot-build-time-optimizations-for-your-micronaut-applications-68b8f1302c5
Build GraalVM Native Image with
Micronaut Framework
Maven plugin available since Micronaut 2.2 for building
GraalVM Native Image
./mvnw package -Dpackaging=native-image
Docker
./mvnw mn:dockerfile -Dpackaging=docker
Docker Native Image
./mvnw mn:dockerfile -Dpackaging=docker-native
Source: “What's new for Maven users in Micronaut 2.2” : https://micronaut.io/blog/2020-11-23-whats-new-maven.html
Quarkus
Source: https://quarkus.io/
Build GraalVM Native Image with Quarkus
mvn –Pnative package
Quarkus Additional Features
• Website for creating the App
• AWS API Gateway integration
• Eclipse MicroProfile compatible
• Funqy for multi cloud solutions
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Quarkus Fanqy
Source: https://quarkus.io/guides/funqy
Quarkus-Fanqy AWS Serverless Support
• AWS Lambda
• AWS API Gateway
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://quarkus.io/guides/funqy-amazon-lambda-http
Spring (Boot) Framework
Source: https://spring.io/
Spring GraalVM Native Project
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://github.com/spring-projects-experimental/spring-native
Build GraalVM Native Image with Spring
Framework
mvn –Pnative package
Framework Comparison 1/2
• Project Initializer
• Programming Model
• Database Access Model Support
• Testing Support
• Standards Support (i.e. MicroProfile)
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“
https://www.youtube.com/watch?v=hnEXOqcNXPs
„Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8
„Java EE, Jakarta EE, MicroProfile, or Maybe All of Them” https://www.eclipse.org/community/eclipse_newsletter/2019/february/Jakarta_Micro_All.php
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“
https://www.youtube.com/watch?v=hnEXOqcNXPs
„Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8
• GraalVM Native Image
• Build time
• GraalVM Native Image compilation time with
Plain Java vs Framework
• Native Image Size
• with Plain Java vs Framework
• (Cold) Startup Time
• Request/Invocation duration
• Memory Consumption
• Plain Java
• Application Size
• (Cold) Start Time
• Request/Invocation duration
• Memory Consumption
Framework Comparison 2/2
Plain Java + GraalVM vs Quarkus + GraalVM
Vadym Kazulkin @VKazulkin , ip.labs GmbH
https://filia-aleks.medium.com/aws-lambda-graalvm-native-quarkus-vs-plain-java-90176eff515d
Lambda demo with common Java
application frameworks
Vadym Kazulkin @VKazulkin , ip.labs GmbH
https://github.com/aws-samples/serverless-java-frameworks-samples
Lambda Container Image Support
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „https://aws.amazon.com/de/blogs/aws/new-for-aws-lambda-container-image-support/
Lambda Container Image Support
Use Cases:
• What about the support of the current Java version?
• Only Long Term Support (LTS) by AWS
• Java 8, Java 11, Java 17 (not for Lambda)
• Use Container (Docker) Image with i.e. Java 18
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://aws.amazon.com/de/corretto/
https://renaissance.dev/
Conclusion
• GraalVM and Frameworks are really powerful with a lot of potential
• Micronaut and Quarkus will improve the cold starts of Java
applications significantly even without GraalVM and native image
• But the combination of discussed frameworks with GraalVM and
Native Image currently not without challenges
• AWS Lambda Custom Runtime requires Linux executable only
• Managing Custom Runtime requires some additional effort
• You pay for the init-phase of the function packaged as AWS Lambda Custom Runtime
• Init-phase is free for the managed runtimes like Java 8 and Java 11
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Personal Recommendations (highly opinionated)
• By default use plain managed Java Long Term Support Version with Amazon
Corretto
• If you don‘t want to miss 3 years of innovation and use the newest Java Version?
• Use Lambda Container Image Support
• If your function needs constantly low response times for the known period of time ?
• Use Provisioned Concurrency additionally
• If your function needs constantly low response time and low cost is a requirement?
• Use GraalVM Native Image with your favourite Framework (Micronaut, Quarkus, Spring Boot
GraalVM Native) and AWS Lambda Custom Runtime
• Consider refactoring costs in your TCO calculation
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Try it yourselves
• Micronaut
• https://github.com/micronaut-guides/micronaut-function-aws-lambda
• Quarkus
• https://github.com/JosemyDuarte/quarkus-terraform-lambda-demo/tree/dynamo-
terraform
• Spring Native
• https://github.com/spring-projects-experimental/spring-native/tree/main/samples/cloud-
function-aws
• Misc examples with all frameworks
• https://github.com/awslabs/aws-serverless-java-container/tree/master/samples
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Adopting Java for the Serverless World at JAX 2022
www.iplabs.de
Accelerate Your Photo Business
Get in Touch

More Related Content

Similar to Adopting Java for the Serverless World at JAX 2022 (20)

PDF
Adopting Java for the Serverless world at IT Tage
Vadym Kazulkin
 
PDF
Adopting Java for the Serverless world at Serverless Meetup Italy
Vadym Kazulkin
 
PDF
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
Vadym Kazulkin
 
PDF
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Vadym Kazulkin
 
PDF
Adapting Java for the Serverless World at JUG Barcelona
Vadym Kazulkin
 
PDF
Adopting Java for the Serverless world at JUG Hamburg
Vadym Kazulkin
 
PDF
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin
 
PDF
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS at Froscon 2024
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS at We Are Developers 2024
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- Serverless Architecture Conference B...
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- AWS Community Day Budapest 2024
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS at GeeCon 2024 Krakow
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- JavaDays Lviv 2024
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- Serverless Architecture Javaland 2025
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS- Serverless Meetup Toronto
Vadym Kazulkin
 
PDF
High performance Serverless Java on AWS at AWS Community Day Belfast 2024
Vadym Kazulkin
 
PDF
Serverless in Java Lessons learnt
Krzysztof Pawlowski
 
PDF
Serverless in java Lessons learnt
Krzysztof Pawlowski
 
Adopting Java for the Serverless world at IT Tage
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup Italy
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Vadym Kazulkin
 
Adapting Java for the Serverless World at JUG Barcelona
Vadym Kazulkin
 
Adopting Java for the Serverless world at JUG Hamburg
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
Vadym Kazulkin
 
High performance Serverless Java on AWS at Froscon 2024
Vadym Kazulkin
 
High performance Serverless Java on AWS at We Are Developers 2024
Vadym Kazulkin
 
High performance Serverless Java on AWS- Serverless Architecture Conference B...
Vadym Kazulkin
 
High performance Serverless Java on AWS- AWS Community Day Budapest 2024
Vadym Kazulkin
 
High performance Serverless Java on AWS at GeeCon 2024 Krakow
Vadym Kazulkin
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
High performance Serverless Java on AWS- JavaDays Lviv 2024
Vadym Kazulkin
 
High performance Serverless Java on AWS- Serverless Architecture Javaland 2025
Vadym Kazulkin
 
High performance Serverless Java on AWS- Serverless Meetup Toronto
Vadym Kazulkin
 
High performance Serverless Java on AWS at AWS Community Day Belfast 2024
Vadym Kazulkin
 
Serverless in Java Lessons learnt
Krzysztof Pawlowski
 
Serverless in java Lessons learnt
Krzysztof Pawlowski
 

More from Vadym Kazulkin (20)

PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
Vadym Kazulkin
 
PDF
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
Vadym Kazulkin
 
PPTX
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
Vadym Kazulkin
 
PPTX
Making sense of AWS Serverless operations at Believe in Serverless community ...
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
Vadym Kazulkin
 
PDF
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Vadym Kazulkin
 
PDF
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
PDF
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Vadym Kazulkin
 
PDF
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
PDF
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
PDF
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Vadym Kazulkin
 
PDF
Event-driven architecture patterns in highly scalable image storage solution ...
Vadym Kazulkin
 
PDF
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
PDF
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
PDF
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at ...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
Vadym Kazulkin
 
Making sense of AWS Serverless operations at Believe in Serverless community ...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
Vadym Kazulkin
 
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution ...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at ...
Vadym Kazulkin
 
Ad

Recently uploaded (20)

PDF
Productivity Management Software | Workstatus
Lovely Baghel
 
PPTX
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
DOCX
TLE9 COOKERY DLL WEEK3 technology and li
jamierha cabaero
 
PDF
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
PDF
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PDF
GITLAB-CICD_For_Professionals_KodeKloud.pdf
deepaktyagi0048
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Productivity Management Software | Workstatus
Lovely Baghel
 
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
TLE9 COOKERY DLL WEEK3 technology and li
jamierha cabaero
 
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Machine Learning Benefits Across Industries
SynapseIndia
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
GITLAB-CICD_For_Professionals_KodeKloud.pdf
deepaktyagi0048
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Ad

Adopting Java for the Serverless World at JAX 2022

  • 1. Adopting Java for the Serverless world from the perspective of the AWS developer Vadym Kazulkin, ip.labs, JAX , 05 Mai 2022
  • 2. Contact Vadym Kazulkin ip.labs GmbH Bonn, Germany Co-Organizer of the Java User Group Bonn [email protected] @VKazulkin https://www.linkedin.com/in/vadymkazulkin https://www.iplabs.de/
  • 7. 2020 Magic Quadrant for Cloud Infrastructure & Platform Services https://pages.awscloud.com/GLOBAL-multi-DL-gartner-mq-cips-2020-learn.html?pg=LWIAWS https://aws.amazon.com/de/resources/analyst-reports/gartner-mq-cips-2021/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 8. The State of Serverless 2021 https://www.datadoghq.com/state-of-serverless/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 9. The State of Serverless 2021 https://www.datadoghq.com/state-of-serverless/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 10. Life of the Java Serverless developer on AWS
  • 11. AWS Java Versions Support • Java 8 • With extended long-term support • Java 11 (since 2019) • Only Long Term Support (LTS) by AWS • Current LTS Java version is Java 17 • Amazon Corrett Support for 17 is released, but not currently available for Lambda Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://aws.amazon.com/de/corretto/
  • 12. Java ist very fast and mature programming language… Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea … but Serverless adoption of Java looks like this Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 13. 2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 14. The State of Serverless 2021 https://www.datadoghq.com/state-of-serverless/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 15. Developers love Java and will be happy to use it for Serverless But what are the challenges Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 16. AWS Lambda Basics Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 17. Creating AWS Lambda with Java 1/3 : Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
  • 18. Creating AWS Lambda with Java 2/3 : Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
  • 19. Creating AWS Lambda with Java 3/3 : Source https://docs.aws.amazon.com/lambda/latest/dg/java-context.html
  • 20. AWS Lambda Price Model Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 21. Cost for Lambda REQUEST DURATION Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 22. Request Tier $ 0.20 Per 1 Mio Requests Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 23. Duration Tier $ 0.00001667 (x86) $ 0.00001333 (Arm) Per GB-Second Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 24. GB-Second ONE SECOND ONE GB Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 25. Example • 1 Mio requests • Lambda x86 with 512MiB • Each lambda takes 200ms 0.5 GiB * 0.2 sec * 1 Mio = 100 000 GB-Seconds Requests: $0.20 GB-Seconds: $1.67 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 26. Challenge Number 1 with Java is a big cold-start Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://www.serverless.com/blog/keep-your-lambdas-warm
  • 27. Cold Start : Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications
  • 28. • Start Firecracker VM • AWS Lambda starts the JVM • Java runtime loads and initializes handler class • Static initializer block of the handler class is executed • Init-phase has full CPU access up to 10 seconds for free for the managed execution environments • Lambda calls the handler method • Full CPU access only approx. at 1.8 GB “assigned” memory to the function Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications Michael Hart: „Shave 99.93% off your Lambda bill with this one weird trick“ https://hichaelmart.medium.com/shave-99-93-off-your-lambda-bill-with-this-one-weird-trick-33c0acebb2ea
  • 29. Function lifecycle- a full cold start Sources: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go Tomasz Łakomy "Notes from Optimizing Lambda Performance for Your Serverless Applications“ https://tlakomy.com/optimizing-lambda-performance-for-serverless-applications
  • 30. AWS Lambda cold start duration per programming language Source: Mikhail Shilkov: „AWS Lambda: Cold Start Duration per Language. 2020 edition” https://mikhail.io/serverless/coldstarts/aws/languages/
  • 31. Cold start duration with Java • Below 1 second is best-case cold start duration for very simple Lambda like HelloWorld with no dependencies • It goes up significantly with more complex scenarios • Instantiation outside of the handler method (static initializer block) to communicate with other (AWS) services (e.g. DynamoDB, SNS, SQS, 3rd party) • Artifact size Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
  • 32. AWS Lambda cold starts by memory size, runtime and artifact size Source: Mike Roberts "Analyzing Cold Start latency of AWS Lambda" https://blog.symphonia.io/posts/2020-06-30_analyzing_cold_start_latency_of_aws_lambda Artifact Size: • Small zip (1KB) • Large zip (48MB) • Large uberjar (53MB)
  • 33. Cold start duration with Java • Below 1 second is best-case cold start duration for very simple Lambda like HelloWorld with no dependencies • It goes up significantly with more complex scenarios • Instantiation outside of the handler method (static instantiation) to communicate with other (AWS) services (i.e. DynamoDB, SNS, SQS, 3rd party) • Artifact size • To minimize the cold start time apply best practices from this talk • Worst-case cold starts can be higher than 10 and even 20 seconds Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
  • 34. • Switch to the AWS SDK 2.0 for Java • Lower footprint and more modular • Allows to configure HTTP Client of your choice (i.e. Java own Basic HTTP Client or newly introduced AWS Common Runtime async HTTP Client) Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Zoe Wang: „Introducing AWS Common Runtime HTTP Client in the AWS SDK for Java 2.x” https://aws.amazon.com/de/blogs/developer/introducing-aws-common-runtime-http-client-in-the-aws-sdk-for-java-2-x/ S3AsyncClient.builder() .httpClientBuilder(AwsCrtAsyncHttpClient.builder() .maxConcurrency(50)) .build(); Best Practices and Recommendations
  • 35. • Less (dependencies, classes) is more • Include only required dependencies (e.g. not the whole AWS SDK 2.0 for Java, but the dependencies to the clients to be used in Lambda) • Exclude dependencies, which you don‘t need at runtime e.g. test frameworks like Junit Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2 <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.4.2</version> <scope>test</scope> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>dynamodb</artifactId> <version>2.10.86</version> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>2.10.86</version> <type>pom</type> <scope>import</scope> </dependency> Best Practices and Recommendations
  • 36. • Initialize dependencies during initialization phase • Use static initialization in the handler class, instead of in the handler method (e.g. handleRequest) to take the advantage of the access to the full CPU core for max 10 seconds • In case of DynamoDB client put the following code outside of the handler method: AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()...build(); DynamoDB dynamoDB = new DynamoDB(client); Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ Best Practices and Recommendations
  • 37. Provide all known values (for building clients i.e. DynamoDB client) to avoid auto-discovery • credential provider, region, endpoint AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard() .withRegion(Regions.US_WEST_2) .withCredentials(new ProfileCredentialsProvider("myProfile")) .build(); Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ Best Practices and Recommendations
  • 38. Best Practices and Recommendations Using Tiered Compilation • Achieve up to 60% faster startup times can use level 1 compilation with little risk of reducing warm start performance Mark Sailes: "Optimizing AWS Lambda function performance for Java” https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-function-performance-for-java/
  • 39. Avoid: • reflection • runtime byte code generation • runtime generated proxies • dynamic class loading Use DI Frameworks which aren‘t reflection-based Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ Best Practices and Recommendations
  • 40. Strive for cost optimization Vadym Kazulkin @VKazulkin , ip.labs GmbH Best Practices and Recommendations
  • 41. Cost for Lambda REQUEST DURATION Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 42. Cost scales linearly with memory Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 43. More memory = more expensive? Kazulkin @VKazulkin , ip.labs GmbH
  • 44. Lambda Power Tuning 1/2 • Executes different settings in parallel • Outputs the optimal setting Image: https://github.com/alexcasalboni/aws-lambda-power-tuning Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 45. Lambda Power Tuning 2/2 • Executes different settings in parallel • Outputs the optimal setting Image: https://github.com/alexcasalboni/aws-lambda-power-tuning Alex Casalboni: “Deep dive: finding the optimal resources allocation for your Lambda functions“ https://dev.to/aws/deep-dive-finding-the-optimal-resources-allocation-for-your-lambda-functions-35a6 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 46. Optimizing AWS Lambda cost and performance using AWS Compute Optimizer Source: Chad Schmutzer „Optimizing AWS Lambda cost and performance using AWS Compute Optimizer” https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-cost-and-performance-using-aws-compute-optimizer/
  • 47. Cost optimization • Java is well optimized for long running server applications • High startup times • High memory utilization Vadym Kazulkin @VKazulkin , ip.labs GmbH And both memory and execution time are cost dimensions, when using Serverless in the cloud
  • 48. GraalVM enters the scene Source: https://www.graalvm.org/
  • 49. GraalVM Goals: Low footprint ahead-of-time mode for JVM-based languages High performance for all languages Convenient language interoperability and polyglot tooling Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 50. GraalVM Architecture Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf „The LLVM Compiler Infrastructure“ https://llvm.org/
  • 51. SubstrateVM Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript” https://www.youtube.com/watch?v=a-XEZobXspo
  • 52. GraalVM on SubstrateVM A game changer for Java & Serverless? Java Function compiled into a native executable using GraalVM on SubstrateVM reduces • “cold start” times • memory footprint by order of magnitude compared to running on JVM. And both memory and execution time are cost dimensions, when using Serverless in the cloud
  • 53. GraalVM on SubstrateVM A game changer for Java & Serverless? Current challenges with native executable using GraalVM : • Most Cloud Providers (AWS) doesn’t provide GraalVM as Java Runtime out of the box, only Open JDK (i.e. AWS provides Corretto) • Some Cloud Providers (e.g. AWS) provide Custom Runtime Option
  • 55. GraalVM Complitation Modes Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 56. AOT vs JIT Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 57. GraalVM Native Cold Start 2021 Source: Aleksandr Filichkin: "AWS Lambda battle 2021: performance comparison for all languages (cold and warm start)“ https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1
  • 58. Support of GraalVM native images in Frameworks Spring Framework: GraalVM native image support in Beta without requiring additional configuration Spring Boot: Ongoing work on experimental Spring Graal Native project. Quarkus: a Kubernetes Native Java framework developed by Red Hat tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards. Micronaut: a modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications.
  • 59. Common principles for all Frameworks • Rely on as little reflection as possible • Avoid runtime byte code generation, runtime generated proxies and dynamic class loading as much as possible • Process annotations at compile time • Compatible with Spring‘s annotations • The common goals: • increase developer productivity • speed up start up times and decrease memory usage for Microservice and Serverless Java applications • with and without usage of GraalVM and native image
  • 60. Steps to deploy to AWS • Installation prerequisites • Framework of your choice (Micronaut, Quarkus, Spring) • GraalVM and Native Image • Apache Maven or Gradle • AWS CLI and AWS SAM CLI (or SAM local for local testing) • Build Linux executable of your application with GraalVM native-image • Use Maven or Gradle plugin (if available) • Deploy Linux executable as AWS Lambda Custom Runtime • Function.zip with bootstrap Linux executable Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 61. AWS Lambda Deployment of Custom Runtime with SAM Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
  • 64. Micronaut Additional Features • Custom Validators • AWS API Gateway integration Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
  • 65. Micronaut® AOT: build-time optimizations for Micronaut applications Micronaut AOT is an extension to the Micronaut Framework which is the foundation to many optimizations that can be implemented at build time but weren’t possible solely with annotation processing. By effectively analyzing the deployment environment, AOT is capable of reducing startup times or distribution size for both native and JVM deliverables. Source: “Introducing Micronaut® AOT: build-time optimizations for your Micronaut applications” https://medium.com/graalvm/introducing-micronaut-aot-build-time-optimizations-for-your-micronaut-applications-68b8f1302c5
  • 66. Build GraalVM Native Image with Micronaut Framework Maven plugin available since Micronaut 2.2 for building GraalVM Native Image ./mvnw package -Dpackaging=native-image Docker ./mvnw mn:dockerfile -Dpackaging=docker Docker Native Image ./mvnw mn:dockerfile -Dpackaging=docker-native Source: “What's new for Maven users in Micronaut 2.2” : https://micronaut.io/blog/2020-11-23-whats-new-maven.html
  • 68. Build GraalVM Native Image with Quarkus mvn –Pnative package
  • 69. Quarkus Additional Features • Website for creating the App • AWS API Gateway integration • Eclipse MicroProfile compatible • Funqy for multi cloud solutions Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
  • 71. Quarkus-Fanqy AWS Serverless Support • AWS Lambda • AWS API Gateway Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://quarkus.io/guides/funqy-amazon-lambda-http
  • 72. Spring (Boot) Framework Source: https://spring.io/
  • 73. Spring GraalVM Native Project Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://github.com/spring-projects-experimental/spring-native
  • 74. Build GraalVM Native Image with Spring Framework mvn –Pnative package
  • 75. Framework Comparison 1/2 • Project Initializer • Programming Model • Database Access Model Support • Testing Support • Standards Support (i.e. MicroProfile) Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs „Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8 „Java EE, Jakarta EE, MicroProfile, or Maybe All of Them” https://www.eclipse.org/community/eclipse_newsletter/2019/february/Jakarta_Micro_All.php
  • 76. Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs „Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8 • GraalVM Native Image • Build time • GraalVM Native Image compilation time with Plain Java vs Framework • Native Image Size • with Plain Java vs Framework • (Cold) Startup Time • Request/Invocation duration • Memory Consumption • Plain Java • Application Size • (Cold) Start Time • Request/Invocation duration • Memory Consumption Framework Comparison 2/2
  • 77. Plain Java + GraalVM vs Quarkus + GraalVM Vadym Kazulkin @VKazulkin , ip.labs GmbH https://filia-aleks.medium.com/aws-lambda-graalvm-native-quarkus-vs-plain-java-90176eff515d
  • 78. Lambda demo with common Java application frameworks Vadym Kazulkin @VKazulkin , ip.labs GmbH https://github.com/aws-samples/serverless-java-frameworks-samples
  • 79. Lambda Container Image Support Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „https://aws.amazon.com/de/blogs/aws/new-for-aws-lambda-container-image-support/
  • 80. Lambda Container Image Support Use Cases: • What about the support of the current Java version? • Only Long Term Support (LTS) by AWS • Java 8, Java 11, Java 17 (not for Lambda) • Use Container (Docker) Image with i.e. Java 18 Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://aws.amazon.com/de/corretto/ https://renaissance.dev/
  • 81. Conclusion • GraalVM and Frameworks are really powerful with a lot of potential • Micronaut and Quarkus will improve the cold starts of Java applications significantly even without GraalVM and native image • But the combination of discussed frameworks with GraalVM and Native Image currently not without challenges • AWS Lambda Custom Runtime requires Linux executable only • Managing Custom Runtime requires some additional effort • You pay for the init-phase of the function packaged as AWS Lambda Custom Runtime • Init-phase is free for the managed runtimes like Java 8 and Java 11 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 82. Personal Recommendations (highly opinionated) • By default use plain managed Java Long Term Support Version with Amazon Corretto • If you don‘t want to miss 3 years of innovation and use the newest Java Version? • Use Lambda Container Image Support • If your function needs constantly low response times for the known period of time ? • Use Provisioned Concurrency additionally • If your function needs constantly low response time and low cost is a requirement? • Use GraalVM Native Image with your favourite Framework (Micronaut, Quarkus, Spring Boot GraalVM Native) and AWS Lambda Custom Runtime • Consider refactoring costs in your TCO calculation Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 83. Try it yourselves • Micronaut • https://github.com/micronaut-guides/micronaut-function-aws-lambda • Quarkus • https://github.com/JosemyDuarte/quarkus-terraform-lambda-demo/tree/dynamo- terraform • Spring Native • https://github.com/spring-projects-experimental/spring-native/tree/main/samples/cloud- function-aws • Misc examples with all frameworks • https://github.com/awslabs/aws-serverless-java-container/tree/master/samples Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 85. www.iplabs.de Accelerate Your Photo Business Get in Touch

Editor's Notes

  • #5: GraalVM: The one to rule them all Speaker: Виктор Полищук
  • #6: PYPL and TIOBE indexes share the same working principle – ‘the more times the language is mentioned, the more popular it is assumed to be’. Their approaches are a bit different, though. TIOBE measures the sheer quantity of 25 search engine hits – including popular Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube, and Baidu. PYPL – how often language tutorials are googled by exploring Google Trends. No wonder TIOBE results differ from PYPL’s.
  • #7: PYPL and TIOBE indexes share the same working principle – ‘the more times the language is mentioned, the more popular it is assumed to be’. Their approaches are a bit different, though. TIOBE measures the sheer quantity of 25 search engine hits – including popular Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube, and Baidu. PYPL – how often language tutorials are googled by exploring Google Trends. No wonder TIOBE results differ from PYPL’s.
  • #9: Gartner 10 consequent year
  • #10: Gartner 10 consequent year
  • #14: GraalVM: The one to rule them all Speaker: Виктор Полищук
  • #15: Corretto is optimized for Amazon Linux 2 operating system
  • #16: Hast du Ideen, das was als Schlussfolgerung ------- Serverless is a perfect fit spannender darzustellen? Quickly validate hypotheses about what will deliver customer value Rapidly experiment by putting services out in front
  • #17: Hast du Ideen, das was als Schlussfolgerung ------- Serverless is a perfect fit spannender darzustellen? Quickly validate hypotheses about what will deliver customer value Rapidly experiment by putting services out in front
  • #18: Hast du Ideen, das was als Schlussfolgerung ------- Serverless is a perfect fit spannender darzustellen? Quickly validate hypotheses about what will deliver customer value Rapidly experiment by putting services out in front
  • #20: Corretto is optimized for Amazon Linux 2 operating system
  • #21: GraalVM: The one to rule them all Speaker: Виктор Полищук
  • #31: Corretto is optimized for Amazon Linux 2 operating system
  • #33: Complete CPU access during boost, Lambda hast fraction of CPU proportional to chosen RAM settings
  • #36: -High throughput (network bandwidth): limited bandwidth (an order of magnitude lower than a single modern SSD) that is shared between all functions packed on the same VM -Communication: functions not directly network accessible, they must communicate via an intermediary service writing state out to slow storage and reading it back in again on subsequent calls
  • #37: “uberjar” packaging of an AWS Lambda function (one where library dependency JARs are unpacked at build time and re-packed into a single JAR file) would have a slower cold start time than a “zip” packaging (one where library dependency JARs are embedded in the “lib” subdirectory within a zip file )
  • #38: -High throughput (network bandwidth): limited bandwidth (an order of magnitude lower than a single modern SSD) that is shared between all functions packed on the same VM -Communication: functions not directly network accessible, they must communicate via an intermediary service writing state out to slow storage and reading it back in again on subsequent calls
  • #39: Hast du Ideen, das was als Schlussfolgerung ------- Serverless is a perfect fit spannender darzustellen? Quickly validate hypotheses about what will deliver customer value Rapidly experiment by putting services out in front
  • #40: TensorFlow and MxNet
  • #41: Hast du Ideen, das was als Schlussfolgerung ------- Serverless is a perfect fit spannender darzustellen? Quickly validate hypotheses about what will deliver customer value Rapidly experiment by putting services out in front
  • #42: -High throughput (network bandwidth): limited bandwidth (an order of magnitude lower than a single modern SSD) that is shared between all functions packed on the same VM -Communication: functions not directly network accessible, they must communicate via an intermediary service writing state out to slow storage and reading it back in again on subsequent calls
  • #43: -High throughput (network bandwidth): limited bandwidth (an order of magnitude lower than a single modern SSD) that is shared between all functions packed on the same VM -Communication: functions not directly network accessible, they must communicate via an intermediary service writing state out to slow storage and reading it back in again on subsequent calls
  • #44: do connection pooling and a whole bunch of other stuff that's really useful in scenarios like when you’re on a server in a long-living process. Lambda isn't one of those scenarios. Realistically, most of the time you're going to be making a single or perhaps a few HTTP calls and then returning a result to your client The built-in Java HTTP client should be good enough for pretty much every use case in a lambda function
  • #45: Scope Import means don’t import transitive dependencies of this dependency () This scope is only supported on a dependency of type pom in the <dependencyManagement> section. It indicates the dependency is to be replaced with the effective list of dependencies in the specified POM's <dependencyManagement> section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency
  • #48: -High throughput (network bandwidth): limited bandwidth (an order of magnitude lower than a single modern SSD) that is shared between all functions packed on the same VM -Communication: functions not directly network accessible, they must communicate via an intermediary service writing state out to slow storage and reading it back in again on subsequent calls
  • #52: Data transfer costs, Step functions for state machine is the most expensive serverless service
  • #55: you have to pay for more memory => lambda execution more expensive? More memory => more perfornance => 1.8 GB more cores => your lambda may run faster You pay more for memory setting but less for the duration Payed in 100 ms steps
  • #56: GraalVM: The one to rule them all Speaker: Виктор Полищук
  • #57: Alex Casalboni
  • #58: Alex Casalboni
  • #60: Alex Casalboni
  • #61: Alex Casalboni
  • #62: Alex Casalboni
  • #63: Alex Casalboni
  • #64: Alex Casalboni
  • #65: Data transfer costs, Step functions for state machine is the most expensive serverless service
  • #67: Shared Tools : Profiling und Debugger Производительность языковая совместимость
  • #68: Версия 20.1 Oracle Cloud
  • #69: Truffle is an Open Source library for building programming language implementations as interpreters for self-modifying Abstract Syntax Trees (AST). Truffle - a toolkit and API for building language interpreters. Truffle. programming languages that can be transformed to LLVM bitcode on Graal VM. LLVM is collection of modular and reusable compiler and toolchain technologies. Sulong : LLVM compiles into the same LLVM bitcode instead of native machine code of the platform. Then GraalVM interpret this bit code and run it on JVM Interpretor for Ruby, R, JS must exist. TruffleRuby, Graal.js, FastR Not ScriptEngine and JSR 223 Nashorn JS API.
  • #70: Truffle is an Open Source library for building programming language implementations as interpreters for self-modifying Abstract Syntax Trees (AST). Truffle - a toolkit and API for building language interpreters. Truffle. programming languages that can be transformed to LLVM bitcode on Graal VM. LLVM is collection of modular and reusable compiler and toolchain technologies. Sulong : LLVM compiles into the same LLVM bitcode instead of native machine code of the platform. Then GraalVM interpret this bit code and run it on JVM Interpretor for Ruby, R, JS must exist. TruffleRuby, Graal.js, FastR Not ScriptEngine and JSR 223 Nashorn JS API.
  • #71: Native mashine code without interpreter, ahead-of-time compiler (all the classes to be used should be known at compile time)…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need ELF- Linux Executable and Linking Format Closed-world-assumption
  • #72: Native mashine code without interpreter, ahead-of-time compiler…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need. Dynamic runtime : Gargbage Collector and ThreadSchedular and Memory Management modular aufgebaut
  • #74: Максим Говорищев Quarkus
  • #75: TensorFlow and MxNet
  • #77: Native mashine code without interpreter, ahead-of-time compiler…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need. Dynamic runtime : Gargbage Collector and ThreadSchedular and Memory Management modular aufgebaut
  • #78: AOT means long time compilation (several minutes)
  • #79: Native mashine code without interpreter, ahead-of-time compiler (all the classes to be used should be known at compile time)…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need ELF- Linux Executable and Linking Format Closed-world-assumption
  • #80: Native mashine code without interpreter, ahead-of-time compiler (all the classes to be used should be known at compile time)…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need ELF- Linux Executable and Linking Format Closed-world-assumption
  • #81: пропускная способность Native mashine code without interpreter, ahead-of-time compiler…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need. Dynamic runtime : Gargbage Collector and ThreadSchedular and Memory Management modular aufgebaut
  • #82: Максим Говорищев Quarkus
  • #83: Alternatively only install docker and build and start docker image Micronaut uses Introspector at compile time to convert/read all annotations and generate all need information at the compile time to avoid dynamic class loading and reflection usages Quarkus and Helidon are considered mire Kubernetes, cloud-native native aka portable
  • #84: Alternatively only install docker and build and start docker image
  • #85: пропускная способность Native mashine code without interpreter, ahead-of-time compiler…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need. Dynamic runtime : Gargbage Collector and ThreadSchedular and Memory Management modular aufgebaut
  • #86: пропускная способность Native mashine code without interpreter, ahead-of-time compiler…optionally include dynamic compiler, no dynamic class loading, because of Ahead-of-Time-Compiler, to know in advance, what classes you need. Dynamic runtime : Gargbage Collector and ThreadSchedular and Memory Management modular aufgebaut
  • #88: You don‘t need http client or netty
  • #93: You don‘t need http client or netty
  • #95: Data transfer costs, Step functions for state machine is the most expensive serverless service
  • #97: Data transfer costs, Step functions for state machine is the most expensive serverless service
  • #99: Graeme Rocher founder of Micronaut joined Oracle Quarkus and Helidon support microProfile, Micronaut hat his own APIs
  • #100: Graeme Rocher founder of Micronaut joined Oracle
  • #104: Corretto is optimized for Amazon Linux 2 operating system
  • #105: Netty dependencies
  • #106: Netty dependencies
  • #107: jlink is a tool that generates a custom Java runtime image that contains only the platform modules that are required for a given application.
  • #108: Netty dependencies
  • #110: Micro Profile / Eclipse / Jakarta EE Not much needed for AWS, as AWS don‘t support this standard, they have their own Standards and serverless eco-system
  • #111: AWS will probably look for that and make something managed available Paul Hohensee: Principal Engineer in AWS, OpenJDK platform engineering
  • #112: FinDev approach per per use/invocation proce models