SlideShare a Scribd company logo
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
by Vadym Kazulkin
ip.labs GmbH
17.10.2023
How to Reduce
Cold Starts for
Java Serverless
Applications in AWS
GraalVM, AWS SnapStart and Co
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Vadym Kazulkin
ip.labs GmbH Bonn, Germany
Co-Organizer of the Java User Group Bonn
v.kazulkin@gmail.com
@VKazulkin
https://dev.to/vkazulkin
https://github.com/Vadym79/
https://de.slideshare.net/VadymKazulkin/
https://www.linkedin.com/in/vadymkazulkin
https://www.iplabs.de/
Contact
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
About ip.labs
High performance Serverless Java on AWS
6
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Java Popularity
7 High performance Serverless Java on AWS Vadym Kazulkin | @VKazulkin | ip.labs GmbH
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
8 High performance Serverless Java on AWS
https://distantjob.com/blog/programming-languages-rank/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Life of the Java
(Serverless)
Developer
on AWS
9 High performance Serverless Java on AWS
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Corretto Java 8
▪ With extended long-term support until 2026
▪ Coretto Java 11 (since 2019)
▪ Coretto Java 17 (since April 2023)
▪ Corretto Java 21(since November 2023)
▪ Only Long Term Support (LTS) by AWS
AWS Java Versions Support
High performance Serverless Java on AWS
10
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS People behind Amazon Corretto
High performance Serverless Java on AWS
11
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
… but
serverless
adoption of
Java looks like
this!
12 High performance Serverless Java on AWS
Java is a very
fast and
mature
programming
language…
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Percent of AWS Lambda Invocations by Language
2021 vs 2023
High performance Serverless Java on AWS
13
https://www.datadoghq.com/state-of-serverless-2021
https://www.datadoghq.com/state-of-serverless/
PHYTON IS THE
MOST POPULAR
LAMDA
RUNTIME
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Developers love Java and will be happy
to use it for Serverless applications
But what are the challenges ?
High performance Serverless Java on AWS
14
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ “cold start” times (latencies)
▪ memory footprint (high cost in AWS)
Serverless with Java Challenges
High performance Serverless Java on AWS
15
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
18 High performance Serverless Java on AWS
Challenge No. 1
A Big Cold-Start
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda function lifecycle – a full cold start
High performance Serverless Java on AWS
19
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
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Start Firecracker VM (execution environment)
▪ AWS Lambda starts the Java runtime
▪ Java runtime loads and initializes Lambda function code
(Lambda handler Java class)
▪ Class loading
▪ Static initializer block of the handler class is executed (i.e. AWS service client
creation)
▪ Runtime dependency injection
▪ Just-in-Time (JIT) compilation
▪ Init-phase has full CPU access up to 10 seconds for free for the managed execution
environments)
▪ Lambda invokes the handler method
High performance Serverless Java on AWS
20
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
Lambda function lifecycle
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Demo Application
High performance Serverless Java on AWS
21
https://github.com/Vadym79/AWSLambdaJavaSnapStart
▪ Lambda has 1024 MB memory setting
▪ Default (Apache) Http Client for
communication with DynamoDB
▪ 15 MB artifact size, , all dependencies in
the POM file
▪ Java compilation option -
XX:+TieredCompilation -
XX:TieredStopAtLevel=1
▪ Info about the experiments:
▪ Approx. 1 hour duration
▪ Approx. first* 100 cold starts
▪ Approx. first 100.000 warm starts
*after Lambda function being re-deployed
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Measurements in
ms
p50 p75 p90 p99 p99.9 max
Amazon Corretto
Java 21 cold start
3158 3214 3270 3428 3601 3725
Amazon Corretto
Java 21 warm start
5,77 6,50 7,81 20,65 90,20 1423,63
Cold and warm starts with Java 21
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ General best practices
▪ AWS SnapStart
▪ GraalVM (Native Image)
▪ Provisioned concurrency
Options to Reduce Cold Start Time
High performance Serverless Java on AWS
23
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ 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 Lambda handler
method:
▪ DynamoDbClient client = DynamoDbClientBuilder.builder()...build();
Best Practices & Recommendations
High performance Serverless Java on AWS
24
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Provide all known values (for building clients i.e. DynamoDB client) to avoid
auto-discovery
▪ region, credential provider
DynamoDbClient client =
DynamoDbClientBuilder.builder().region(Regions.US_WEST_2).build();
Best Practices & Recommendations
High performance Serverless Java on AWS
25
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Prime dependencies during initialization phase (when it worth doing)
▪ „Fake“ the calls to pre-initialize „some other expensive stuff“ (this technique is
called Priming)
▪ In case of DynamoDB client put the following code outside of the handler method
to pre-initialize the Jackson Marshaller:
DynamoDbClient client =
DynamoDbClientBuilder.builder().region(Regions.US_WEST_2).build();
GetItemResponse getItemResponse = client.getItem(GetItemRequest.builder()
.key(Map.of("PK", AttributeValue.builder().s(0).build()))
.tableName(PRODUCT_TABLE_NAME).build());
Best Practices & Recommendations
High performance Serverless Java on AWS
26
invocation forces Jackson Marshallers to initialize
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Word of caution
High performance Serverless Java on AWS
27
Re-measure it yourselves!
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Measurements in
ms
p50 p75 p90 p99 p99.9 max
Amazon Corretto
Java 21 cold start
3158 3214 3270 3428 3601 3725
Amazon Corretto
Java 21 warm start
5,77 6,50 7,81 20,65 90,20 1423,63
Cold and warm starts with Java 21
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
In case a priming is possible, but not
done and cold start happens, the warm
start/execution time takes longer
Effect of Priming
High performance Serverless Java on AWS
29
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Avoid:
▪ reflection
▪ runtime byte code generation
▪ runtime generated proxies
▪ dynamic class loading
Use DI Frameworks which aren‘t
reflection-based
Best Practices & Recommendations
High performance Serverless Java on AWS
30
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart
31 High performance Serverless Java on AWS
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
„AWS Lambda SnapStart „ series
High performance Serverless Java on AWS
32
https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
Article series covers they why and what
behind Lambda SnapStart and priming
techniques including measurements for cold
and warm starts with different settings for
▪ Java 11
▪ Java 17
▪ Java 21
▪ Micronaut
▪ Quarkus
▪ Spring Boot 2.7
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
34
https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda uses
the CRaC APIs
for runtime
hooks
C
Create
Snapshot
Firecracker microVM
create & restore
snapshot
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
35
https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
36
https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/
Firecracker microVM
create & restore
snapshot
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Linux CRIU available since 2012 allows a running application to be paused and restarted at some
point later in time, potentially on a different machine.
▪ The overall goal of the project is to support the migration of containers.
▪ When performing a checkpoint, essentially, the full context of the process is saved: program
counter, registers, stacks, memory-mapped and shared memory
▪ To restore the application, all this data can be reloaded and (theoretically) it continues from the
same point.
▪ Challenges
▪ open files
▪ network connections
▪ sudden change in the value of the system clock
▪ time-based caches
CRIU (Checkpoint/Restore in Userspace)
High performance Serverless Java on AWS
37
https://criu.org/Main_Page
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Compared to CRIU and Docker checkpoint and restore, Firecracker
snapshotting is different in the sense that it does not only saves a single
process or container but a whole running OS.
▪ Advantages : we don't have to care about file handles because they will be still valid
after resume.
▪ Drawbacks : the need to reseed /dev/random and to sync the system clock.
Snapshot /checkpointing and restore
Firecracker microVM vs CRIU
High performance Serverless Java on AWS
38
https://mail.openjdk.org/pipermail/discuss/2021-July/005864.html
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
39
https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment Phase
High performance Serverless Java on AWS
40
https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Invocation Phase
High performance Serverless Java on AWS
41
https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
42
https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda uses the
CRaC APIs for
runtime hooks
for Priming
C
Create
Snapshot
Firecracker microVM
create & restore snapshot
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Speed up warmup time of the Java applications
▪ The C2 compiler is used for very hot methods, which uses profiling data collected from
the running application to optimize as much as possible.
▪ Techniques like aggressive method inlining and speculative optimizations can easily
lead to better performing code than generated ahead of time (AOT) using a static
compiler.
▪ JVM needs both time and compute resources to determine which methods to compile
and compiling them. This same work has to happen every time we run an application
▪ Ideally, we would like to run the application and then store all the state about the
compiled methods, even the compiled code and state associated with the application
and then we’d like to be able to restore it
Ideas behind CRaC (Coordinated Restore at
Checkpoint)
High performance Serverless Java on AWS
44
https://www.azul.com/blog/superfast-application-startup-java-on-crac/ https://github.com/CRaC/docs
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
CRaC (Coordinated Restore at
Checkpoint) Project
▪ Based on Linux
Checkpoint/Restore in Userspace
(CRIU)
▪ Simple API: beforeCheckpoint()
and afterRestore() methods
CRaC (Coordinated Restore at Checkpoint)
High performance Serverless Java on AWS
45
https://www.azul.com/blog/superfast-application-startup-java-on-crac/ | https://github.com/CRaC/docs | https://criu.org/Main_Page
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Enabled with Java Priming
High performance Serverless Java on AWS
46
https://dev.to/aws-builders/measuring-java-11-lambda-cold-starts-with-snapstart-part-5-priming-end-to-end-latency-and-deployment-time-jem
<dependency>
<groupId>io.github.crac</groupId>
<artifactId>org-crac</artifactId>
<version>0.1.3</version>
</dependency>
if a refer to Priming in this
talk, I mean concretely
DynamoDB request
invocation priming
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda SnapStart Priming Guide
High performance Serverless Java on AWS
47
guide aims to explain techniques
for priming Java applications.
It assumes a base understanding
of AWS Lambda, Lambda
SnapStart, and CRaC.
https://github.com/marksailes/snapstart-priming-guide
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS Lambda under the Hood
High performance Serverless Java on AWS
48
https://www.infoq.com/articles/aws-lambda-under-the-hood/
https://www.infoq.com/presentations/aws-lambda-arch/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ SnapStart supports the Java 11, 17 and 21 (Corretto) managed runtime
only
▪ Deployment with SnapStart enabled takes more than 2-2,5 minutes
additionally
▪ Snapshot is deleted from cache if Lambda function is not invoked for 14
days
▪ SnapStart currently does not support :
▪ Provisioned concurrency
▪ arm64 architecture (supports only x86)
▪ Amazon Elastic File System (Amazon EFS)
▪ Ephemeral storage greater than 512 MB
AWS SnapStart Challenges & Limitations
High performance Serverless Java on AWS
49
https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Perform Priming out of the box without writing the logic on our own
▪ If snapshot not found do regular cold start and create snapshot under
the hood
▪ Snapshot creation on first Lambda function invocation instead of during
the deployment phase
▪ Regular cold start as long as the snapshot hasn’t been fully taken
▪ Trade off between duration of the deployment phase and several regular
bigger cold starts until the snapshot is taken and SnapStart becomes
effective (and therefore much shorter cold starts)
AWS SnapStart Possible Next Steps
High performance Serverless Java on AWS
50
https://dev.to/aws-builders/reducing-cold-starts-on-aws-lambda-with-java-runtime-future-ideas-about-snapstart-graalvm-and-co-3a1b
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
4000
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Cold starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client, compilation
-XX:+TieredCompilation -XX:TieredStopAtLevel=1
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
5,00
10,00
15,00
20,00
25,00
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Warm starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client compilation -
XX:+TieredCompilation -XX:TieredStopAtLevel=1
p50 p75 p90 p99
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
200
400
600
800
1000
1200
1400
1600
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Warm starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client compilation -
XX:+TieredCompilation -XX:TieredStopAtLevel=1
p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Demo Application
High performance Serverless Java on AWS
54
https://github.com/Vadym79/AWSLambdaJavaSnapStart
▪ Lambda has 1024 MB memory setting
▪ Default (Apache) Http Client for
communication with DynamoDB
▪ 15 MB artifact size, , all dependencies in
the POM file
▪ Java compilation option -
XX:+TieredCompilation -
XX:TieredStopAtLevel=1
▪ Info about the experiments:
▪ Approx. 1 hour duration
▪ Approx. first* 100 cold starts
▪ Approx. first 100.000 warm starts
*after Lambda function being re-deployed
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda Memory Setting
High performance Serverless Java on AWS
55
ONE SECOND ONE GB
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Cold starts of Lambda function with Java 21 runtime
without SnapStart for different memory settings
p50 p75 p90 p99 p99.9 max
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
20,00
40,00
60,00
80,00
100,00
120,00
140,00
160,00
180,00
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Warm starts of Lambda function with Java 21 runtime
without SnapStart for different memory settings
p50 p75 p90 p99 p99.9
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
1000
2000
3000
4000
5000
6000
7000
8000
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Cold starts of Lambda function with Java 21 runtime with
SnapStart without Priming for different memory settings
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
20
40
60
80
100
120
140
160
180
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Warm starts of Lambda function with Java 21 runtime
with SnapStart without Priming for different memory settings
p50 p75 p90 p99 p99.9
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
200
400
600
800
1000
1200
1400
1600
1800
2000
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Cold starts of Lambda function with Java 21 runtime with
SnapStart with Priming for different memory settings
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
100,00
200,00
300,00
400,00
500,00
600,00
256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB
Warm starts of Lambda function with Java 21 runtime
with SnapStart with Priming for different memory settings
p50 p75 p90 p99 p99.9
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda Deployment Artifact Size
High performance Serverless Java on AWS
62
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Cold starts of Lambda function with Java 21 runtime
using deployment artifact sizes for p90
p90 small p90 medium p90 big
https://dev.to/aws-builders/aws-snapstart-part-11-measuring-cold-starts-with-java-21-using-different-deployment-artifact-sizes-4g29
▪ Small -137 KB (“Hello World”)
▪ Medium – 15 MB (our sample
application)
▪ Big -50 MB (our sample
application + additional
dependencies other to AWS
services)
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ 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 i.e. test frameworks like Junit
Best Practices & Recommendations
High performance Serverless Java on AWS
64
<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.22.2</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.22.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Using Lambda Layers
High performance Serverless Java on AWS
65
https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html
https://docs.aws.amazon.com/lambda/latest/dg/java-layers.html#java-layer-compatibility
• aws-lambda-java-core
• aws-lambda-java-events
• org-crac
• slf4j-simple
• jackson-dataformat-xml
Type: AWS::Serverless::Function
Properties:
FunctionName: MyFunctionWithLayer
Layers:
- !Sub
arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:a
ws-pure-java-21-common-lambda-layer:1
Handler:
software…handler.GetProductByIdHandler::handleRequest
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
4000
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Cold starts of Lambda function with Java 21 runtime with
and without the usage of the Lambda Layer options for
p90
all dependencies in the POM file using Lambda Layer
https://github.com/Vadym79/AWSLambdaJavaSnapStart/tree/main/pure-lambda-21-with-common-layer
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
7,00
7,10
7,20
7,30
7,40
7,50
7,60
7,70
7,80
7,90
8,00
8,10
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Warm starts of Lambda function with Java 21 runtime
with and without the usage of the Lambda Layer options
for p90
all dependencies in the POM file with Lambda Layer
https://github.com/Vadym79/AWSLambdaJavaSnapStart/tree/main/pure-lambda-21-with-common-layer
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Java Compilation
High performance Serverless Java on AWS
68
https://www.geeksforgeeks.org/what-are-the-roles-of-java-compiler-and-interpreter/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Java Compilation Options
High performance Serverless Java on AWS
69
Mark Sailes: "Optimizing AWS Lambda function performance for Java” https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-function-performance-for-java/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
1000
2000
3000
4000
5000
6000
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Cold starts of Lambda function with Java 21 runtime
using different compilation options for p90
Tiered StopAtLevel 1 StopAtLevel 2 StopAtLevel 3 StopAtLevel 4
https://dev.to/aws-builders/aws-snapstart-part-14-measuring-cold-and-warm-starts-with-java-21-using-different-compilation-options-el4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
2,00
4,00
6,00
8,00
10,00
12,00
w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming
Warm starts of Lambda function with Java 21 runtime
using different compilation options for p90
Tiered StopAtLevel 1 StopAtLevel 2 StopAtLevel 3 StopAtLevel 4
https://dev.to/aws-builders/aws-snapstart-part-14-measuring-cold-and-warm-starts-with-java-21-using-different-compilation-options-el4
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
HTTP Clients to connect to DynamoDB
High performance Serverless Java on AWS
72
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
DynamoDbClient client = DynamoDbClient.builder().region(Region.EU_CENTRAL_1)
. httpClient(ApacheHttpClient.create())
//.httpClient(UrlConnectionHttpClient.create())
//.httpClient(AwsCrtHttpClient.create())
.build();
Add dependency to the synchronous HTTP Client in use to pom.xml, i.e.
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-crt-client</artifactId>
</dependency>
Setting synchronous DynamoDB Client
High performance Serverless Java on AWS
73
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming
Cold starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation
and different synchronous HTTP Clients for p90
URL Connection Apache AWS CRT
https://dev.to/aws-builders/aws-snapstart-part-15-measuring-cold-and-warm-starts-with-java-21-using-different-synchronous-http-clients-579o
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
2,00
4,00
6,00
8,00
10,00
12,00
w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming
Warm starts of Lambda function with Java 21 runtime and StopAtLevel 1
compilation and different synchronous HTTP Clients for p90
URL Connection Apache AWS CRT
https://dev.to/aws-builders/aws-snapstart-part-15-measuring-cold-and-warm-starts-with-java-21-using-different-synchronous-http-clients-579o
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
DynamoDbAsyncClient dynamoAsyncDbClient =
DynamoDbAsyncClient.builder().region(Region.EU_CENTRAL_1)
. httpClient(NettyNioAsyncHttpClient.create())
//.httpClient(AwsCrtAsyncHttpClient.create())
.build();
CompletableFuture<GetItemResponse> getItemReponseAsync =
dynamoAsyncDbClient.getItem(GetItemRequest.builder().
key(Map.of("PK",AttributeValue.builder().
s(id).build())).tableName(PRODUCT_TABLE_NAME).build());
GetItemResponse getItemResponse = getItemReponseAsync.join();
Setting asynchronous DynamoDB Client
High performance Serverless Java on AWS
76
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Add dependency to the asynchronous HTTP Client in use to pom.xml, i.e.
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</dependency>
Setting asynchronous DynamoDB Client
High performance Serverless Java on AWS
77
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming
Cold starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation
and different asynchronous HTTP Clients for p90
NettyNio AWS CRT
https://dev.to/aws-builders/aws-snapstart-part-16-measuring-cold-and-warm-starts-with-java-21-using-different-asynchronous-http-clients-4n2
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
2,00
4,00
6,00
8,00
10,00
12,00
w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming
Warm starts of Lambda function with Java 21 runtime and StopAtLevel 1
compilation and different asynchronous HTTP Clients for p90
NettyNio AWS CRT
https://dev.to/aws-builders/aws-snapstart-part-16-measuring-cold-and-warm-starts-with-java-21-using-different-asynchronous-http-clients-4n2
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
HTTP client recommendations
High performance Serverless Java on AWS
80
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration.html
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AWS SnapStart Deployment & Invocation
High performance Serverless Java on AWS
81
https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/
Firecracker microVM
create & restore
snapshot
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
with SnapStart w/o Priming with SnapStart with Priming
Cold starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client, compilation
-XX:+TieredCompilation -XX:TieredStopAtLevel=1
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-17-impact-of-the-snapshot-tiered-cache-on-the-cold-starts-with-java-21-52ef
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
with SnapStart w/o Primingwith SnapStart w/o Priming
(last 50)
with SnapStart with
Priming
with SnapStart with
Priming (last 50)
Cold starts of all approx.100 and last 50 Lambda functions with
Java 21 runtime with
1024 MB memory setting, Apache Http Client, compilation
-XX:+TieredCompilation -XX:TieredStopAtLevel=1
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-17-impact-of-the-snapshot-tiered-cache-on-the-cold-starts-with-java-21-52ef
Due to the effect of
snapshot tiered cache,
cold start times
reduces with the
number of invocations
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
84 High performance Serverless Java on AWS
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ Low footprint ahead-of-time mode for JVM-based languages
▪ High performance for all languages
▪ Convenient language interoperability and polyglot tooling
GraalVM Goals
High performance Serverless Java on AWS
85
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
GraalVM Architecture
High performance Serverless Java on AWS
86
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
GraalVM Ahead-of-Time Compilation
High performance Serverless Java on AWS
87
Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript”
https://www.youtube.com/watch?v=a-XEZobXspo
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
AOT vs JIT
High performance Serverless Java on AWS
88
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
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.
GraalVM on SubstrateVM as another option for Java &
Serverless
High performance Serverless Java on AWS
89
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ AWS doesn’t provide GraalVM (Native Image) as Java Runtime out of the box
▪ AWS provides Custom Runtime Option
Current Challenges with Native Executable using
GraalVM
High performance Serverless Java on AWS
90
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Custom Lambda Runtimes
High performance Serverless Java on AWS
91
https://github.com/Vadym79/AWSLambdaGraalVMNativeImage
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
GraalVM Release Calendar
High performance Serverless Java on AWS
92
https://www.graalvm.org/release-calendar/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
GraalVM CE is based on OpenJDK
High performance Serverless Java on AWS
93
https://www.graalvm.org/2022/openjdk-announcement/
https://blogs.oracle.com/java/post/graalvm-free-license
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
500
1000
1500
2000
2500
3000
3500
4000
w/o SnapStart with SnapStart w/o Priming with SnapStart with
Priming
GraalVM Native Image
Cold starts of Lambda function with Java 21 runtime with.
1024 MB memory setting, Apache Http Client
p50 p75 p90 p99 p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
5,00
10,00
15,00
20,00
25,00
w/o SnapStart with SnapStart w/o
Priming
with SnapStart with
Priming
GraalVM Native Image
Warm starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client
p50 p75 p90 p99
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
200
400
600
800
1000
1200
1400
1600
w/o SnapStart with SnapStart w/o Priming with SnapStart with
Priming
GraalVM Native Image
Max warm starts of Lambda function with Java 21 runtime with
1024 MB memory setting, Apache Http Client
p99.9 max
https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda Memory Setting for Custom Runtime (GraalVM
Native Image)
High performance Serverless Java on AWS
97
ONE SECOND ONE GB
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0
200
400
600
800
1000
1200
256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB
Cold starts of Lambda function with GraalVM 21 Native
Image for different memory settings
p50 p75 p90 p99 p99.9 max
https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
2,00
4,00
6,00
8,00
10,00
12,00
14,00
16,00
18,00
20,00
256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB
Warm starts of Lambda function with GraalVM 21 Native
Image for different memory settings
p50 p75 p90 p99
https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
0,00
50,00
100,00
150,00
200,00
250,00
300,00
350,00
400,00
450,00
500,00
256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB
Warm starts of Lambda function with GraalVM 21 Native
Image for different memory settings
p99.9 max
https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ GraalVM is really powerful and has a lot of potential
▪ GraalVM Native Image improves cold starts and memory footprint
significantly
▪ GraalVM Native Image is currently not without challenges
▪ AWS Lambda Custom Runtime requires Linux executable only
▪ Building Custom Runtime requires some additional effort
▪ e.g. you need a scalable CI/CD pipeline to build memory-intensive native image
▪ Build time is a factor
▪ You pay for the init-phase of the function packaged as AWS Lambda
Custom and Docker Runtime
▪ Init-phase is free for the managed runtimes like Java 11, Java17 and Java 21
GraalVM Conclusion
High performance Serverless Java on AWS
101
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
▪ You can run into errors when application
is running
GraalVM Conclusion
High performance Serverless Java on AWS
102
https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/blob/master/pure-lambda-graalvm-jdk-21-native-image/src/main/reflect.json
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Frameworks and libraries Ready for GraalVM Native Image
High performance Serverless Java on AWS
103
https://www.graalvm.org/native-image/libraries-and-frameworks/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda Provisioned Concurrency
High performance Serverless Java on AWS
104
Requires manually managing start and end
time when provisioned concurrency should
apply (can be tricky for spikey workloads)
▪ You pay for unused capacity
https://aws.amazon.com/blogs/aws/new-provisioned-concurrency-for-lambda-functions/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Lambda Proactive Initialization
High performance Serverless Java on AWS
105
In June 2023 AWS updated the documentation for the Lambda Function lifecycle and included this
new statement: for functions using unreserved (on-demand) concurrency, Lambda may
proactively initialize a function instance, even if there's no invocation. When this happens,
you can observe an unexpected time gap between your function's initialization and invocation
phases. This gap can appear similar to what you would observe when using provisioned
concurrency.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html
https://aaronstuyvenberg.com/posts/understanding-proactive-initialization
Running this query over several days
across multiple runtimes and
invocation methods, between 50%
and 75% of initializations were
proactive (versus 50% to 25% which
were true cold starts)
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
“Data API for Amazon Aurora Serverless v2
with AWS SDK for Java” series
High performance Serverless Java on AWS
106
Article series also covers
cold and warm start time
measurements and
optimization techniques
https://dev.to/aws-builders/data-api-for-amazon-aurora-serverless-v2-with-aws-sdk-for-java-part-1-introduction-and-set-up-of-the-sample-application-3g71
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
“Spring Boot 3 application on AWS Lambda” series
High performance Serverless Java on AWS
107
Article series covers different
ways to write Spring Boot 3
application on AWS Lambda
▪ AWS Serverless Java Container
▪ AWS Lambda Web Adapter
▪ Spring Cloud Functions
▪ Custom Docker Image
▪ GraalVM Native Image
Cold and warm start time
measurements are also provided
https://dev.to/aws-builders/spring-boot-3-application-on-aws-lambda-part-1-introduction-to-the-series-2m5g
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Project Leyden
High performance Serverless Java on AWS
108
The primary goal of this
Project is to improve the
startup time, time to
peak performance, and
footprint of Java
programs.
https://www.youtube.com/watch?v=lnth19Kf-x0
https://openjdk.org/projects/leyden/
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Word of caution
High performance Serverless Java on AWS
109
Re-measure for your use case!
Even with my examples measurements
might already produce different results due
to:
▪ Lambda Amazon Corretto Java 21
managed runtime minor version changes
▪ Lambda SnapStart snapshot create and
restore improvements
▪ Firecracker VM improvements
▪ Graal VM (major and minor version) and
Native Image improvements
▪ There are still servers behind Lambda
▪ Java Memory Model impact (L or RAM
caches hits and misses)
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
111 High performance Serverless Java on AWS
Thank you
Vadym Kazulkin | @VKazulkin |ip.labs GmbH
Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea
Ad

More Related Content

Similar to High performance Serverless Java on AWS- GoTo Amsterdam 2024 (20)

How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
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 Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
Vadym Kazulkin
 
High performance Serverless Java on AWS- Serverless Meetup Toronto
High performance Serverless Java on AWS- Serverless Meetup TorontoHigh performance Serverless Java on AWS- Serverless Meetup Toronto
High performance Serverless Java on AWS- Serverless Meetup Toronto
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Vadym Kazulkin
 
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Vadym Kazulkin
 
Adopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT TageAdopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT Tage
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup Italy
Adopting Java for the Serverless world at Serverless Meetup ItalyAdopting Java for the Serverless world at Serverless Meetup Italy
Adopting Java for the Serverless world at Serverless Meetup Italy
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
Vadym Kazulkin
 
Adopting Java for the Serverless world at JUG Hamburg
Adopting Java for the Serverless world at  JUG HamburgAdopting Java for the Serverless world at  JUG Hamburg
Adopting Java for the Serverless world at JUG Hamburg
Vadym Kazulkin
 
Adopting Java for the Serverless world at JUG London
Adopting Java for the Serverless world at  JUG LondonAdopting Java for the Serverless world at  JUG London
Adopting Java for the Serverless world at JUG London
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022
Vadym Kazulkin
 
Adapting Java for the Serverless World at JUG Barcelona
Adapting Java for the Serverless World at JUG BarcelonaAdapting Java for the Serverless World at JUG Barcelona
Adapting Java for the Serverless World at JUG Barcelona
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
Adopting Java for the Serverless world at AWS User Group Pretoria
Adopting Java for the Serverless world at AWS User Group PretoriaAdopting Java for the Serverless world at AWS User Group Pretoria
Adopting Java for the Serverless world at AWS User Group Pretoria
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda-OBI ...
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
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 Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at I...
Vadym Kazulkin
 
High performance Serverless Java on AWS- Serverless Meetup Toronto
High performance Serverless Java on AWS- Serverless Meetup TorontoHigh performance Serverless Java on AWS- Serverless Meetup Toronto
High performance Serverless Java on AWS- Serverless Meetup Toronto
Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Vadym Kazulkin
 
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Vadym Kazulkin
 
Adopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT TageAdopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT Tage
Vadym Kazulkin
 
Adopting Java for the Serverless world at Serverless Meetup Italy
Adopting Java for the Serverless world at Serverless Meetup ItalyAdopting Java for the Serverless world at Serverless Meetup Italy
Adopting Java for the Serverless world at Serverless Meetup Italy
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at V...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at A...
Vadym Kazulkin
 
Adopting Java for the Serverless world at JUG Hamburg
Adopting Java for the Serverless world at  JUG HamburgAdopting Java for the Serverless world at  JUG Hamburg
Adopting Java for the Serverless world at JUG Hamburg
Vadym Kazulkin
 
Adopting Java for the Serverless world at JUG London
Adopting Java for the Serverless world at  JUG LondonAdopting Java for the Serverless world at  JUG London
Adopting Java for the Serverless world at JUG London
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022
Vadym Kazulkin
 
Adapting Java for the Serverless World at JUG Barcelona
Adapting Java for the Serverless World at JUG BarcelonaAdapting Java for the Serverless World at JUG Barcelona
Adapting Java for the Serverless World at JUG Barcelona
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda - Wa...
Vadym Kazulkin
 
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at J...
Vadym Kazulkin
 
Adopting Java for the Serverless world at AWS User Group Pretoria
Adopting Java for the Serverless world at AWS User Group PretoriaAdopting Java for the Serverless world at AWS User Group Pretoria
Adopting Java for the Serverless world at AWS User Group Pretoria
Vadym Kazulkin
 

More from Vadym Kazulkin (14)

Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Making sense of AWS Serverless operations- AWS User Group NurembergMaking sense of AWS Serverless operations- AWS User Group Nuremberg
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Vadym Kazulkin
 
Making sense of AWS Serverless operations at Believe in Serverless community ...
Making sense of AWS Serverless operations at Believe in Serverless community ...Making sense of AWS Serverless operations at Believe in Serverless community ...
Making sense of AWS Serverless operations at Believe in Serverless community ...
Vadym Kazulkin
 
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Making sense of AWS Serverless operations - Amarathon Geek China 2024Making sense of AWS Serverless operations - Amarathon Geek China 2024
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Making sense of AWS Serverless operations- Serverless Architecture Conference...Making sense of AWS Serverless operations- Serverless Architecture Conference...
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Making sense of AWS Serverless operations AWS Community Day NL 2024-Making sense of AWS Serverless operations AWS Community Day NL 2024-
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution ...
Event-driven architecture patterns in highly scalable image storage solution ...Event-driven architecture patterns in highly scalable image storage solution ...
Event-driven architecture patterns in highly scalable image storage solution ...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
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 ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda  at ...How to develop, run and optimize Spring Boot 3 application on AWS Lambda  at ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at ...
Vadym Kazulkin
 
Developing highly scalable image storage solution with AWS Serverless at GoTo...
Developing highly scalable image storage solution with AWS Serverless at GoTo...Developing highly scalable image storage solution with AWS Serverless at GoTo...
Developing highly scalable image storage solution with AWS Serverless at GoTo...
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Making sense of AWS Serverless operations- AWS User Group NurembergMaking sense of AWS Serverless operations- AWS User Group Nuremberg
Making sense of AWS Serverless operations- AWS User Group Nuremberg
Vadym Kazulkin
 
Making sense of AWS Serverless operations at Believe in Serverless community ...
Making sense of AWS Serverless operations at Believe in Serverless community ...Making sense of AWS Serverless operations at Believe in Serverless community ...
Making sense of AWS Serverless operations at Believe in Serverless community ...
Vadym Kazulkin
 
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Making sense of AWS Serverless operations - Amarathon Geek China 2024Making sense of AWS Serverless operations - Amarathon Geek China 2024
Making sense of AWS Serverless operations - Amarathon Geek China 2024
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...Event-driven architecture patterns in highly scalable image storage solution-...
Event-driven architecture patterns in highly scalable image storage solution-...
Vadym Kazulkin
 
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Making sense of AWS Serverless operations- Serverless Architecture Conference...Making sense of AWS Serverless operations- Serverless Architecture Conference...
Making sense of AWS Serverless operations- Serverless Architecture Conference...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Making sense of AWS Serverless operations AWS Community Day NL 2024-Making sense of AWS Serverless operations AWS Community Day NL 2024-
Making sense of AWS Serverless operations AWS Community Day NL 2024-
Vadym Kazulkin
 
Event-driven architecture patterns in highly scalable image storage solution ...
Event-driven architecture patterns in highly scalable image storage solution ...Event-driven architecture patterns in highly scalable image storage solution ...
Event-driven architecture patterns in highly scalable image storage solution ...
Vadym Kazulkin
 
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Detect operational anomalies in Serverless Applications with Amazon DevOps Gu...
Vadym Kazulkin
 
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024Amazon DevOps Guru for Serverless Applications at JAWS Pankration 2024
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 ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda  at ...How to develop, run and optimize Spring Boot 3 application on AWS Lambda  at ...
How to develop, run and optimize Spring Boot 3 application on AWS Lambda at ...
Vadym Kazulkin
 
Developing highly scalable image storage solution with AWS Serverless at GoTo...
Developing highly scalable image storage solution with AWS Serverless at GoTo...Developing highly scalable image storage solution with AWS Serverless at GoTo...
Developing highly scalable image storage solution with AWS Serverless at GoTo...
Vadym Kazulkin
 
Ad

Recently uploaded (20)

Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Ad

High performance Serverless Java on AWS- GoTo Amsterdam 2024

  • 1. Vadym Kazulkin | @VKazulkin |ip.labs GmbH by Vadym Kazulkin ip.labs GmbH 17.10.2023 How to Reduce Cold Starts for Java Serverless Applications in AWS GraalVM, AWS SnapStart and Co
  • 2. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Vadym Kazulkin ip.labs GmbH Bonn, Germany Co-Organizer of the Java User Group Bonn [email protected] @VKazulkin https://dev.to/vkazulkin https://github.com/Vadym79/ https://de.slideshare.net/VadymKazulkin/ https://www.linkedin.com/in/vadymkazulkin https://www.iplabs.de/ Contact
  • 3. Vadym Kazulkin | @VKazulkin |ip.labs GmbH About ip.labs High performance Serverless Java on AWS 6
  • 4. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Java Popularity 7 High performance Serverless Java on AWS Vadym Kazulkin | @VKazulkin | ip.labs GmbH
  • 5. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 8 High performance Serverless Java on AWS https://distantjob.com/blog/programming-languages-rank/
  • 6. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Life of the Java (Serverless) Developer on AWS 9 High performance Serverless Java on AWS
  • 7. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Corretto Java 8 ▪ With extended long-term support until 2026 ▪ Coretto Java 11 (since 2019) ▪ Coretto Java 17 (since April 2023) ▪ Corretto Java 21(since November 2023) ▪ Only Long Term Support (LTS) by AWS AWS Java Versions Support High performance Serverless Java on AWS 10
  • 8. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS People behind Amazon Corretto High performance Serverless Java on AWS 11
  • 9. Vadym Kazulkin | @VKazulkin |ip.labs GmbH … but serverless adoption of Java looks like this! 12 High performance Serverless Java on AWS Java is a very fast and mature programming language…
  • 10. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Percent of AWS Lambda Invocations by Language 2021 vs 2023 High performance Serverless Java on AWS 13 https://www.datadoghq.com/state-of-serverless-2021 https://www.datadoghq.com/state-of-serverless/ PHYTON IS THE MOST POPULAR LAMDA RUNTIME
  • 11. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Developers love Java and will be happy to use it for Serverless applications But what are the challenges ? High performance Serverless Java on AWS 14
  • 12. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ “cold start” times (latencies) ▪ memory footprint (high cost in AWS) Serverless with Java Challenges High performance Serverless Java on AWS 15
  • 13. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 18 High performance Serverless Java on AWS Challenge No. 1 A Big Cold-Start
  • 14. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda function lifecycle – a full cold start High performance Serverless Java on AWS 19 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
  • 15. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Start Firecracker VM (execution environment) ▪ AWS Lambda starts the Java runtime ▪ Java runtime loads and initializes Lambda function code (Lambda handler Java class) ▪ Class loading ▪ Static initializer block of the handler class is executed (i.e. AWS service client creation) ▪ Runtime dependency injection ▪ Just-in-Time (JIT) compilation ▪ Init-phase has full CPU access up to 10 seconds for free for the managed execution environments) ▪ Lambda invokes the handler method High performance Serverless Java on AWS 20 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 Lambda function lifecycle
  • 16. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Demo Application High performance Serverless Java on AWS 21 https://github.com/Vadym79/AWSLambdaJavaSnapStart ▪ Lambda has 1024 MB memory setting ▪ Default (Apache) Http Client for communication with DynamoDB ▪ 15 MB artifact size, , all dependencies in the POM file ▪ Java compilation option - XX:+TieredCompilation - XX:TieredStopAtLevel=1 ▪ Info about the experiments: ▪ Approx. 1 hour duration ▪ Approx. first* 100 cold starts ▪ Approx. first 100.000 warm starts *after Lambda function being re-deployed
  • 17. Vadym Kazulkin | @VKazulkin |ip.labs GmbH https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k Measurements in ms p50 p75 p90 p99 p99.9 max Amazon Corretto Java 21 cold start 3158 3214 3270 3428 3601 3725 Amazon Corretto Java 21 warm start 5,77 6,50 7,81 20,65 90,20 1423,63 Cold and warm starts with Java 21
  • 18. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ General best practices ▪ AWS SnapStart ▪ GraalVM (Native Image) ▪ Provisioned concurrency Options to Reduce Cold Start Time High performance Serverless Java on AWS 23
  • 19. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ 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 Lambda handler method: ▪ DynamoDbClient client = DynamoDbClientBuilder.builder()...build(); Best Practices & Recommendations High performance Serverless Java on AWS 24
  • 20. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Provide all known values (for building clients i.e. DynamoDB client) to avoid auto-discovery ▪ region, credential provider DynamoDbClient client = DynamoDbClientBuilder.builder().region(Regions.US_WEST_2).build(); Best Practices & Recommendations High performance Serverless Java on AWS 25
  • 21. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Prime dependencies during initialization phase (when it worth doing) ▪ „Fake“ the calls to pre-initialize „some other expensive stuff“ (this technique is called Priming) ▪ In case of DynamoDB client put the following code outside of the handler method to pre-initialize the Jackson Marshaller: DynamoDbClient client = DynamoDbClientBuilder.builder().region(Regions.US_WEST_2).build(); GetItemResponse getItemResponse = client.getItem(GetItemRequest.builder() .key(Map.of("PK", AttributeValue.builder().s(0).build())) .tableName(PRODUCT_TABLE_NAME).build()); Best Practices & Recommendations High performance Serverless Java on AWS 26 invocation forces Jackson Marshallers to initialize
  • 22. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Word of caution High performance Serverless Java on AWS 27 Re-measure it yourselves!
  • 23. Vadym Kazulkin | @VKazulkin |ip.labs GmbH https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k Measurements in ms p50 p75 p90 p99 p99.9 max Amazon Corretto Java 21 cold start 3158 3214 3270 3428 3601 3725 Amazon Corretto Java 21 warm start 5,77 6,50 7,81 20,65 90,20 1423,63 Cold and warm starts with Java 21
  • 24. Vadym Kazulkin | @VKazulkin |ip.labs GmbH In case a priming is possible, but not done and cold start happens, the warm start/execution time takes longer Effect of Priming High performance Serverless Java on AWS 29
  • 25. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Avoid: ▪ reflection ▪ runtime byte code generation ▪ runtime generated proxies ▪ dynamic class loading Use DI Frameworks which aren‘t reflection-based Best Practices & Recommendations High performance Serverless Java on AWS 30
  • 26. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart 31 High performance Serverless Java on AWS
  • 27. Vadym Kazulkin | @VKazulkin |ip.labs GmbH „AWS Lambda SnapStart „ series High performance Serverless Java on AWS 32 https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4 Article series covers they why and what behind Lambda SnapStart and priming techniques including measurements for cold and warm starts with different settings for ▪ Java 11 ▪ Java 17 ▪ Java 21 ▪ Micronaut ▪ Quarkus ▪ Spring Boot 2.7
  • 28. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 34 https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/ Vadym Kazulkin @VKazulkin , ip.labs GmbH Lambda uses the CRaC APIs for runtime hooks C Create Snapshot Firecracker microVM create & restore snapshot
  • 29. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 35 https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
  • 30. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 36 https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/ Firecracker microVM create & restore snapshot
  • 31. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Linux CRIU available since 2012 allows a running application to be paused and restarted at some point later in time, potentially on a different machine. ▪ The overall goal of the project is to support the migration of containers. ▪ When performing a checkpoint, essentially, the full context of the process is saved: program counter, registers, stacks, memory-mapped and shared memory ▪ To restore the application, all this data can be reloaded and (theoretically) it continues from the same point. ▪ Challenges ▪ open files ▪ network connections ▪ sudden change in the value of the system clock ▪ time-based caches CRIU (Checkpoint/Restore in Userspace) High performance Serverless Java on AWS 37 https://criu.org/Main_Page
  • 32. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Compared to CRIU and Docker checkpoint and restore, Firecracker snapshotting is different in the sense that it does not only saves a single process or container but a whole running OS. ▪ Advantages : we don't have to care about file handles because they will be still valid after resume. ▪ Drawbacks : the need to reseed /dev/random and to sync the system clock. Snapshot /checkpointing and restore Firecracker microVM vs CRIU High performance Serverless Java on AWS 38 https://mail.openjdk.org/pipermail/discuss/2021-July/005864.html
  • 33. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 39 https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
  • 34. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment Phase High performance Serverless Java on AWS 40 https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
  • 35. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Invocation Phase High performance Serverless Java on AWS 41 https://dev.to/vkazulkin/measuring-java-11-lambda-cold-starts-with-snapstart-part-1-first-impressions-30a4
  • 36. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 42 https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/ Vadym Kazulkin @VKazulkin , ip.labs GmbH Lambda uses the CRaC APIs for runtime hooks for Priming C Create Snapshot Firecracker microVM create & restore snapshot
  • 37. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Speed up warmup time of the Java applications ▪ The C2 compiler is used for very hot methods, which uses profiling data collected from the running application to optimize as much as possible. ▪ Techniques like aggressive method inlining and speculative optimizations can easily lead to better performing code than generated ahead of time (AOT) using a static compiler. ▪ JVM needs both time and compute resources to determine which methods to compile and compiling them. This same work has to happen every time we run an application ▪ Ideally, we would like to run the application and then store all the state about the compiled methods, even the compiled code and state associated with the application and then we’d like to be able to restore it Ideas behind CRaC (Coordinated Restore at Checkpoint) High performance Serverless Java on AWS 44 https://www.azul.com/blog/superfast-application-startup-java-on-crac/ https://github.com/CRaC/docs
  • 38. Vadym Kazulkin | @VKazulkin |ip.labs GmbH CRaC (Coordinated Restore at Checkpoint) Project ▪ Based on Linux Checkpoint/Restore in Userspace (CRIU) ▪ Simple API: beforeCheckpoint() and afterRestore() methods CRaC (Coordinated Restore at Checkpoint) High performance Serverless Java on AWS 45 https://www.azul.com/blog/superfast-application-startup-java-on-crac/ | https://github.com/CRaC/docs | https://criu.org/Main_Page
  • 39. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Enabled with Java Priming High performance Serverless Java on AWS 46 https://dev.to/aws-builders/measuring-java-11-lambda-cold-starts-with-snapstart-part-5-priming-end-to-end-latency-and-deployment-time-jem <dependency> <groupId>io.github.crac</groupId> <artifactId>org-crac</artifactId> <version>0.1.3</version> </dependency> if a refer to Priming in this talk, I mean concretely DynamoDB request invocation priming
  • 40. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda SnapStart Priming Guide High performance Serverless Java on AWS 47 guide aims to explain techniques for priming Java applications. It assumes a base understanding of AWS Lambda, Lambda SnapStart, and CRaC. https://github.com/marksailes/snapstart-priming-guide
  • 41. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS Lambda under the Hood High performance Serverless Java on AWS 48 https://www.infoq.com/articles/aws-lambda-under-the-hood/ https://www.infoq.com/presentations/aws-lambda-arch/
  • 42. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ SnapStart supports the Java 11, 17 and 21 (Corretto) managed runtime only ▪ Deployment with SnapStart enabled takes more than 2-2,5 minutes additionally ▪ Snapshot is deleted from cache if Lambda function is not invoked for 14 days ▪ SnapStart currently does not support : ▪ Provisioned concurrency ▪ arm64 architecture (supports only x86) ▪ Amazon Elastic File System (Amazon EFS) ▪ Ephemeral storage greater than 512 MB AWS SnapStart Challenges & Limitations High performance Serverless Java on AWS 49 https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
  • 43. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Perform Priming out of the box without writing the logic on our own ▪ If snapshot not found do regular cold start and create snapshot under the hood ▪ Snapshot creation on first Lambda function invocation instead of during the deployment phase ▪ Regular cold start as long as the snapshot hasn’t been fully taken ▪ Trade off between duration of the deployment phase and several regular bigger cold starts until the snapshot is taken and SnapStart becomes effective (and therefore much shorter cold starts) AWS SnapStart Possible Next Steps High performance Serverless Java on AWS 50 https://dev.to/aws-builders/reducing-cold-starts-on-aws-lambda-with-java-runtime-future-ideas-about-snapstart-graalvm-and-co-3a1b
  • 44. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 4000 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Cold starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client, compilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1 p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 45. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 5,00 10,00 15,00 20,00 25,00 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Warm starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client compilation - XX:+TieredCompilation -XX:TieredStopAtLevel=1 p50 p75 p90 p99 https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 46. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 200 400 600 800 1000 1200 1400 1600 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Warm starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client compilation - XX:+TieredCompilation -XX:TieredStopAtLevel=1 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 47. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Demo Application High performance Serverless Java on AWS 54 https://github.com/Vadym79/AWSLambdaJavaSnapStart ▪ Lambda has 1024 MB memory setting ▪ Default (Apache) Http Client for communication with DynamoDB ▪ 15 MB artifact size, , all dependencies in the POM file ▪ Java compilation option - XX:+TieredCompilation - XX:TieredStopAtLevel=1 ▪ Info about the experiments: ▪ Approx. 1 hour duration ▪ Approx. first* 100 cold starts ▪ Approx. first 100.000 warm starts *after Lambda function being re-deployed
  • 48. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda Memory Setting High performance Serverless Java on AWS 55 ONE SECOND ONE GB
  • 49. Vadym Kazulkin | @VKazulkin |ip.labs GmbH https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Cold starts of Lambda function with Java 21 runtime without SnapStart for different memory settings p50 p75 p90 p99 p99.9 max
  • 50. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 20,00 40,00 60,00 80,00 100,00 120,00 140,00 160,00 180,00 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Warm starts of Lambda function with Java 21 runtime without SnapStart for different memory settings p50 p75 p90 p99 p99.9 https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 51. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 1000 2000 3000 4000 5000 6000 7000 8000 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Cold starts of Lambda function with Java 21 runtime with SnapStart without Priming for different memory settings p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 52. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 20 40 60 80 100 120 140 160 180 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Warm starts of Lambda function with Java 21 runtime with SnapStart without Priming for different memory settings p50 p75 p90 p99 p99.9 https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 53. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 200 400 600 800 1000 1200 1400 1600 1800 2000 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Cold starts of Lambda function with Java 21 runtime with SnapStart with Priming for different memory settings p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 54. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 100,00 200,00 300,00 400,00 500,00 600,00 256 MB 512 MB 768 MB 1024 MB 1536 MB 2048 MB Warm starts of Lambda function with Java 21 runtime with SnapStart with Priming for different memory settings p50 p75 p90 p99 p99.9 https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 55. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda Deployment Artifact Size High performance Serverless Java on AWS 62
  • 56. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Cold starts of Lambda function with Java 21 runtime using deployment artifact sizes for p90 p90 small p90 medium p90 big https://dev.to/aws-builders/aws-snapstart-part-11-measuring-cold-starts-with-java-21-using-different-deployment-artifact-sizes-4g29 ▪ Small -137 KB (“Hello World”) ▪ Medium – 15 MB (our sample application) ▪ Big -50 MB (our sample application + additional dependencies other to AWS services)
  • 57. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ 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 i.e. test frameworks like Junit Best Practices & Recommendations High performance Serverless Java on AWS 64 <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.22.2</version> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>2.22.2</version> <type>pom</type> <scope>import</scope> </dependency>
  • 58. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Using Lambda Layers High performance Serverless Java on AWS 65 https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html https://docs.aws.amazon.com/lambda/latest/dg/java-layers.html#java-layer-compatibility • aws-lambda-java-core • aws-lambda-java-events • org-crac • slf4j-simple • jackson-dataformat-xml Type: AWS::Serverless::Function Properties: FunctionName: MyFunctionWithLayer Layers: - !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:a ws-pure-java-21-common-lambda-layer:1 Handler: software…handler.GetProductByIdHandler::handleRequest
  • 59. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 4000 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Cold starts of Lambda function with Java 21 runtime with and without the usage of the Lambda Layer options for p90 all dependencies in the POM file using Lambda Layer https://github.com/Vadym79/AWSLambdaJavaSnapStart/tree/main/pure-lambda-21-with-common-layer
  • 60. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 7,00 7,10 7,20 7,30 7,40 7,50 7,60 7,70 7,80 7,90 8,00 8,10 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Warm starts of Lambda function with Java 21 runtime with and without the usage of the Lambda Layer options for p90 all dependencies in the POM file with Lambda Layer https://github.com/Vadym79/AWSLambdaJavaSnapStart/tree/main/pure-lambda-21-with-common-layer
  • 61. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Java Compilation High performance Serverless Java on AWS 68 https://www.geeksforgeeks.org/what-are-the-roles-of-java-compiler-and-interpreter/
  • 62. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Java Compilation Options High performance Serverless Java on AWS 69 Mark Sailes: "Optimizing AWS Lambda function performance for Java” https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-function-performance-for-java/
  • 63. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 1000 2000 3000 4000 5000 6000 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Cold starts of Lambda function with Java 21 runtime using different compilation options for p90 Tiered StopAtLevel 1 StopAtLevel 2 StopAtLevel 3 StopAtLevel 4 https://dev.to/aws-builders/aws-snapstart-part-14-measuring-cold-and-warm-starts-with-java-21-using-different-compilation-options-el4
  • 64. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 2,00 4,00 6,00 8,00 10,00 12,00 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming Warm starts of Lambda function with Java 21 runtime using different compilation options for p90 Tiered StopAtLevel 1 StopAtLevel 2 StopAtLevel 3 StopAtLevel 4 https://dev.to/aws-builders/aws-snapstart-part-14-measuring-cold-and-warm-starts-with-java-21-using-different-compilation-options-el4
  • 65. Vadym Kazulkin | @VKazulkin |ip.labs GmbH HTTP Clients to connect to DynamoDB High performance Serverless Java on AWS 72
  • 66. Vadym Kazulkin | @VKazulkin |ip.labs GmbH DynamoDbClient client = DynamoDbClient.builder().region(Region.EU_CENTRAL_1) . httpClient(ApacheHttpClient.create()) //.httpClient(UrlConnectionHttpClient.create()) //.httpClient(AwsCrtHttpClient.create()) .build(); Add dependency to the synchronous HTTP Client in use to pom.xml, i.e. <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>aws-crt-client</artifactId> </dependency> Setting synchronous DynamoDB Client High performance Serverless Java on AWS 73
  • 67. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming Cold starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation and different synchronous HTTP Clients for p90 URL Connection Apache AWS CRT https://dev.to/aws-builders/aws-snapstart-part-15-measuring-cold-and-warm-starts-with-java-21-using-different-synchronous-http-clients-579o
  • 68. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 2,00 4,00 6,00 8,00 10,00 12,00 w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming Warm starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation and different synchronous HTTP Clients for p90 URL Connection Apache AWS CRT https://dev.to/aws-builders/aws-snapstart-part-15-measuring-cold-and-warm-starts-with-java-21-using-different-synchronous-http-clients-579o
  • 69. Vadym Kazulkin | @VKazulkin |ip.labs GmbH DynamoDbAsyncClient dynamoAsyncDbClient = DynamoDbAsyncClient.builder().region(Region.EU_CENTRAL_1) . httpClient(NettyNioAsyncHttpClient.create()) //.httpClient(AwsCrtAsyncHttpClient.create()) .build(); CompletableFuture<GetItemResponse> getItemReponseAsync = dynamoAsyncDbClient.getItem(GetItemRequest.builder(). key(Map.of("PK",AttributeValue.builder(). s(id).build())).tableName(PRODUCT_TABLE_NAME).build()); GetItemResponse getItemResponse = getItemReponseAsync.join(); Setting asynchronous DynamoDB Client High performance Serverless Java on AWS 76
  • 70. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Add dependency to the asynchronous HTTP Client in use to pom.xml, i.e. <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>netty-nio-client</artifactId> </dependency> Setting asynchronous DynamoDB Client High performance Serverless Java on AWS 77
  • 71. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming Cold starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation and different asynchronous HTTP Clients for p90 NettyNio AWS CRT https://dev.to/aws-builders/aws-snapstart-part-16-measuring-cold-and-warm-starts-with-java-21-using-different-asynchronous-http-clients-4n2
  • 72. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 2,00 4,00 6,00 8,00 10,00 12,00 w/o AWS SnapStart with AWS SnapStart w/o priming with AWS SnapStart with priming Warm starts of Lambda function with Java 21 runtime and StopAtLevel 1 compilation and different asynchronous HTTP Clients for p90 NettyNio AWS CRT https://dev.to/aws-builders/aws-snapstart-part-16-measuring-cold-and-warm-starts-with-java-21-using-different-asynchronous-http-clients-4n2
  • 73. Vadym Kazulkin | @VKazulkin |ip.labs GmbH HTTP client recommendations High performance Serverless Java on AWS 80 https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration.html
  • 74. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AWS SnapStart Deployment & Invocation High performance Serverless Java on AWS 81 https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html https://aws.amazon.com/de/blogs/compute/reducing-java-cold-starts-on-aws-lambda-functions-with-snapstart/ Firecracker microVM create & restore snapshot
  • 75. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 with SnapStart w/o Priming with SnapStart with Priming Cold starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client, compilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1 p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-17-impact-of-the-snapshot-tiered-cache-on-the-cold-starts-with-java-21-52ef
  • 76. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 with SnapStart w/o Primingwith SnapStart w/o Priming (last 50) with SnapStart with Priming with SnapStart with Priming (last 50) Cold starts of all approx.100 and last 50 Lambda functions with Java 21 runtime with 1024 MB memory setting, Apache Http Client, compilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1 p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-17-impact-of-the-snapshot-tiered-cache-on-the-cold-starts-with-java-21-52ef Due to the effect of snapshot tiered cache, cold start times reduces with the number of invocations
  • 77. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 84 High performance Serverless Java on AWS
  • 78. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ Low footprint ahead-of-time mode for JVM-based languages ▪ High performance for all languages ▪ Convenient language interoperability and polyglot tooling GraalVM Goals High performance Serverless Java on AWS 85 Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 79. Vadym Kazulkin | @VKazulkin |ip.labs GmbH GraalVM Architecture High performance Serverless Java on AWS 86
  • 80. Vadym Kazulkin | @VKazulkin |ip.labs GmbH GraalVM Ahead-of-Time Compilation High performance Serverless Java on AWS 87 Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript” https://www.youtube.com/watch?v=a-XEZobXspo
  • 81. Vadym Kazulkin | @VKazulkin |ip.labs GmbH AOT vs JIT High performance Serverless Java on AWS 88 Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 82. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 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. GraalVM on SubstrateVM as another option for Java & Serverless High performance Serverless Java on AWS 89
  • 83. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ AWS doesn’t provide GraalVM (Native Image) as Java Runtime out of the box ▪ AWS provides Custom Runtime Option Current Challenges with Native Executable using GraalVM High performance Serverless Java on AWS 90
  • 84. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Custom Lambda Runtimes High performance Serverless Java on AWS 91 https://github.com/Vadym79/AWSLambdaGraalVMNativeImage
  • 85. Vadym Kazulkin | @VKazulkin |ip.labs GmbH GraalVM Release Calendar High performance Serverless Java on AWS 92 https://www.graalvm.org/release-calendar/
  • 86. Vadym Kazulkin | @VKazulkin |ip.labs GmbH GraalVM CE is based on OpenJDK High performance Serverless Java on AWS 93 https://www.graalvm.org/2022/openjdk-announcement/ https://blogs.oracle.com/java/post/graalvm-free-license
  • 87. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 500 1000 1500 2000 2500 3000 3500 4000 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming GraalVM Native Image Cold starts of Lambda function with Java 21 runtime with. 1024 MB memory setting, Apache Http Client p50 p75 p90 p99 p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 88. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 5,00 10,00 15,00 20,00 25,00 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming GraalVM Native Image Warm starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client p50 p75 p90 p99 https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 89. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 200 400 600 800 1000 1200 1400 1600 w/o SnapStart with SnapStart w/o Priming with SnapStart with Priming GraalVM Native Image Max warm starts of Lambda function with Java 21 runtime with 1024 MB memory setting, Apache Http Client p99.9 max https://dev.to/aws-builders/aws-snapstart-part-13-measuring-warm-starts-with-java-21-using-different-lambda-memory-settings-160k
  • 90. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda Memory Setting for Custom Runtime (GraalVM Native Image) High performance Serverless Java on AWS 97 ONE SECOND ONE GB
  • 91. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0 200 400 600 800 1000 1200 256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB Cold starts of Lambda function with GraalVM 21 Native Image for different memory settings p50 p75 p90 p99 p99.9 max https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
  • 92. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 2,00 4,00 6,00 8,00 10,00 12,00 14,00 16,00 18,00 20,00 256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB Warm starts of Lambda function with GraalVM 21 Native Image for different memory settings p50 p75 p90 p99 https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
  • 93. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 0,00 50,00 100,00 150,00 200,00 250,00 300,00 350,00 400,00 450,00 500,00 256 MB 512 MB 768 MB 1024 MB 1280 MB 1536 MB Warm starts of Lambda function with GraalVM 21 Native Image for different memory settings p99.9 max https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/tree/master/pure-lambda-graalvm-jdk-21-native-image
  • 94. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ GraalVM is really powerful and has a lot of potential ▪ GraalVM Native Image improves cold starts and memory footprint significantly ▪ GraalVM Native Image is currently not without challenges ▪ AWS Lambda Custom Runtime requires Linux executable only ▪ Building Custom Runtime requires some additional effort ▪ e.g. you need a scalable CI/CD pipeline to build memory-intensive native image ▪ Build time is a factor ▪ You pay for the init-phase of the function packaged as AWS Lambda Custom and Docker Runtime ▪ Init-phase is free for the managed runtimes like Java 11, Java17 and Java 21 GraalVM Conclusion High performance Serverless Java on AWS 101
  • 95. Vadym Kazulkin | @VKazulkin |ip.labs GmbH ▪ You can run into errors when application is running GraalVM Conclusion High performance Serverless Java on AWS 102 https://github.com/Vadym79/AWSLambdaGraalVMNativeImage/blob/master/pure-lambda-graalvm-jdk-21-native-image/src/main/reflect.json
  • 96. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Frameworks and libraries Ready for GraalVM Native Image High performance Serverless Java on AWS 103 https://www.graalvm.org/native-image/libraries-and-frameworks/
  • 97. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda Provisioned Concurrency High performance Serverless Java on AWS 104 Requires manually managing start and end time when provisioned concurrency should apply (can be tricky for spikey workloads) ▪ You pay for unused capacity https://aws.amazon.com/blogs/aws/new-provisioned-concurrency-for-lambda-functions/
  • 98. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Lambda Proactive Initialization High performance Serverless Java on AWS 105 In June 2023 AWS updated the documentation for the Lambda Function lifecycle and included this new statement: for functions using unreserved (on-demand) concurrency, Lambda may proactively initialize a function instance, even if there's no invocation. When this happens, you can observe an unexpected time gap between your function's initialization and invocation phases. This gap can appear similar to what you would observe when using provisioned concurrency. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html https://aaronstuyvenberg.com/posts/understanding-proactive-initialization Running this query over several days across multiple runtimes and invocation methods, between 50% and 75% of initializations were proactive (versus 50% to 25% which were true cold starts)
  • 99. Vadym Kazulkin | @VKazulkin |ip.labs GmbH “Data API for Amazon Aurora Serverless v2 with AWS SDK for Java” series High performance Serverless Java on AWS 106 Article series also covers cold and warm start time measurements and optimization techniques https://dev.to/aws-builders/data-api-for-amazon-aurora-serverless-v2-with-aws-sdk-for-java-part-1-introduction-and-set-up-of-the-sample-application-3g71
  • 100. Vadym Kazulkin | @VKazulkin |ip.labs GmbH “Spring Boot 3 application on AWS Lambda” series High performance Serverless Java on AWS 107 Article series covers different ways to write Spring Boot 3 application on AWS Lambda ▪ AWS Serverless Java Container ▪ AWS Lambda Web Adapter ▪ Spring Cloud Functions ▪ Custom Docker Image ▪ GraalVM Native Image Cold and warm start time measurements are also provided https://dev.to/aws-builders/spring-boot-3-application-on-aws-lambda-part-1-introduction-to-the-series-2m5g
  • 101. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Project Leyden High performance Serverless Java on AWS 108 The primary goal of this Project is to improve the startup time, time to peak performance, and footprint of Java programs. https://www.youtube.com/watch?v=lnth19Kf-x0 https://openjdk.org/projects/leyden/
  • 102. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Word of caution High performance Serverless Java on AWS 109 Re-measure for your use case! Even with my examples measurements might already produce different results due to: ▪ Lambda Amazon Corretto Java 21 managed runtime minor version changes ▪ Lambda SnapStart snapshot create and restore improvements ▪ Firecracker VM improvements ▪ Graal VM (major and minor version) and Native Image improvements ▪ There are still servers behind Lambda ▪ Java Memory Model impact (L or RAM caches hits and misses)
  • 103. Vadym Kazulkin | @VKazulkin |ip.labs GmbH 111 High performance Serverless Java on AWS Thank you
  • 104. Vadym Kazulkin | @VKazulkin |ip.labs GmbH Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea