Home Java javaTutorial Data API for Amazon Aurora Serverless vith AWS SDK for Java - Part omparing cold and warm starts: Data API vs DynamoDB

Data API for Amazon Aurora Serverless vith AWS SDK for Java - Part omparing cold and warm starts: Data API vs DynamoDB

Jul 23, 2024 am 11:17 AM

Data API for Amazon Aurora Serverless vith AWS SDK for Java - Part omparing cold and warm starts: Data API vs DynamoDB

Introduction

In the part 7 of the series Data API for Amazon Aurora Serverless v2 with AWS SDK for Java - Data API meets SnapStart we measured the cold and warm start times of the Lambda function connecting to the Amazon Aurora Serverless v2 PostgreSQL database using Data API for 3 use cases :

  • without SnapStart enabled on the Lambda function
  • with SnapStart enabled on the Lambda function but without priming optimization
  • with SnapStart enabled on the Lambda function and with priming optimization (pre-warming SQL statement execution on the PostgreSQL database).

In this article we'd like to compare those measurements with those but with using DynamoDB instead of Data API for Amazon Aurora Serverless v2.

Comparing Lambda cold and warm starts: Data API for Amazon Aurora Serverless v2 vs DynamoDB

In my article series about Lambda SnapStart we've already done such measurements for the similar application but in the article Measuring warm starts with Java 21 using different Lambda memory settings .

Both applications Data API for Amazon Aurora Serverless v2 and DynamoDB are very similar :

  • They provide logic to store and retrieve products from the database
  • Lambda functions from both projects have 1024 MB memory setting
  • The deployment artifact sizes are around 18 MB for both
  • Lambda functions from both projects use default synchronous HTTP Apache client to communicate with databases
  • Lambda functions from both projects use x86_64 architecture

Now lets put all measurements together.

Cold (c) and warm (m) start time in ms:

Approach c p50 c p75 c p90 c p99 c p99.9 c max w p50 w p75 w p90 w p99 w p99.9 w max
Data API, no SnapStart enabled 3154.35 3237 3284.91 3581.49 3702.12 3764.92 104.68 173.96 271.32 572.11 1482.89 2179.7
DynamoDB, no SnapStart enabled 3157.6 3213.85 3270.8 3428.2 3601.12 3725.02 5.77 6.50 7.81 20.65 90.20 1423.63
Data API, SnapStart enabled without priming 1856.11 1994.61 2467.83 3229.11 3238.80 3241.75 61.02 113.32 185.37 639.35 1973.30 2878.5
DynamoDB, SnapStart enabled without priming 1626.69 1741.10 2040.99 2219.75 2319.54 2321.64 5.64 6.41 7.87 21.40 99.81 1355.09
Data API, SnapStart enabled with priming 990.84 1069.04 1634.84 2120.00 2285.03 2286.9 60.06 106.35 185.37 581.27 1605.37 2658.24
DynamoDB, SnapStart enabled with priming 702.55 759.52 1038.50 1169.66 1179.05 1179.36 5.73 6.51 7.87 21.75 92.19 328.41

Conclusion

In this article I compared measurements of the cold and warm start times of the Lambda function connecting to the Amazon Aurora Serverless v2 PostgreSQL database using Data API vs connecting to DynamoDB database for 3 use cases:

  • without SnapStart enabled on the Lambda function
  • with SnapStart enabled on the Lambda function but without priming optimization
  • with SnapStart enabled on the Lambda function and with priming of the database request

What we observed is that cold start times without enabling SnapStart on the Lambda function are quite comparable for both. In case SnapStart is enabled (without and especially with priming) the Data API for Amazon Aurora Serverless v2 has significantly higher cold start times, especially for the percentiles >= 90. I will need to dig deeper to understand this difference as I didn't expect it to be that big, especially if priming was applied. Maybe the reason for that is that AWS native services like DynamoDB are more SnapStart-aware I can deal better with connection resumes.

The warm start (execution) times were constantly much higher for Data API for Amazon Aurora Serverless v2 comparing to DynamoDB which I also expected as DynamoDB is known for its single- or double-digit milliseconds response times.

The above is the detailed content of Data API for Amazon Aurora Serverless vith AWS SDK for Java - Part omparing cold and warm starts: Data API vs DynamoDB. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1242
24
Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Apr 19, 2025 pm 04:51 PM

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...

How do I convert names to numbers to implement sorting and maintain consistency in groups? How do I convert names to numbers to implement sorting and maintain consistency in groups? Apr 19, 2025 pm 11:30 PM

Solutions to convert names to numbers to implement sorting In many application scenarios, users may need to sort in groups, especially in one...

How to simplify field mapping issues in system docking using MapStruct? How to simplify field mapping issues in system docking using MapStruct? Apr 19, 2025 pm 06:21 PM

Field mapping processing in system docking often encounters a difficult problem when performing system docking: how to effectively map the interface fields of system A...

How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? Apr 19, 2025 pm 11:45 PM

Start Spring using IntelliJIDEAUltimate version...

How to elegantly obtain entity class variable names to build database query conditions? How to elegantly obtain entity class variable names to build database query conditions? Apr 19, 2025 pm 11:42 PM

When using MyBatis-Plus or other ORM frameworks for database operations, it is often necessary to construct query conditions based on the attribute name of the entity class. If you manually every time...

How to safely convert Java objects to arrays? How to safely convert Java objects to arrays? Apr 19, 2025 pm 11:33 PM

Conversion of Java Objects and Arrays: In-depth discussion of the risks and correct methods of cast type conversion Many Java beginners will encounter the conversion of an object into an array...

How to use the Redis cache solution to efficiently realize the requirements of product ranking list? How to use the Redis cache solution to efficiently realize the requirements of product ranking list? Apr 19, 2025 pm 11:36 PM

How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...

E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? Apr 19, 2025 pm 11:27 PM

Detailed explanation of the design of SKU and SPU tables on e-commerce platforms This article will discuss the database design issues of SKU and SPU in e-commerce platforms, especially how to deal with user-defined sales...

See all articles