DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases
  • Simplify Database Geo-Redundancy Backup With Cloud Storage Services
  • Data Migration from AWS DocumentDB to Atlas on AWS
  • Reporting in Microservices: How To Optimize Performance

Trending

  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
  • IoT and Cybersecurity: Addressing Data Privacy and Security Challenges
  • Introduction to Retrieval Augmented Generation (RAG)
  1. DZone
  2. Data Engineering
  3. Databases
  4. What You Need to Know About ElastiCache Serverless

What You Need to Know About ElastiCache Serverless

Uncover key insights on Elasticache Serverless in our latest piece. Dive into essential details for a quick understanding of its benefits and applications.

By 
Oded Poncz user avatar
Oded Poncz
·
Jan. 08, 24 · Review
Likes (2)
Comment
Save
Tweet
Share
2.5K Views

Join the DZone community and get the full member experience.

Join For Free

At AWS re:Invent 2023, ElastiCache Serverless was announced. This continues the trend of databases offering a serverless service, so understandably, there is excitement from both the Redis and serverless communities. It's not surprising that in-memory data stores are the last ones to go serverless. Creating a true serverless experience for sub-millisecond data stores is extremely complicated, as data must remain in memory even when there is no traffic at all.

So, how did AWS pull it off? How did they create a serverless offering for a service that must remain up at all times? And which use cases is ElastiCache Serverless a good fit for? The answer to those questions can be found in the service pricing model.

What Is a Serverless Database?

A serverless database is a managed database service that eliminates the need for infrastructure management, scaling, and provisioning. This means developers can focus on building and deploying applications without worrying about the underlying data infrastructure they are using.

Serverless databases are extremely easy to start with, as there is almost no setup involved. Developers do not need to think about data requirements like capacity, throughput, scaling, durability, etc. They simply register for the service to get an endpoint, and from that point on, they can store and retrieve data at any scale.

A good serverless database infrastructure is able to provide the experience of infinite scalability for your application without degradation of the service. If you have hundreds of entities or billions of entities in the database, you would get the same performance.

But the most appealing feature of serverless offerings is that you pay only for what you use. The serverless pricing model is built to scale with your workload. As scaling is elastic, so is your billing. If you consume only a small amount of resources, your bill will be small. If you consume more storage, more throughput, and more data, your bill will grow accordingly.

The most advanced concept that is used to provide a serverless database is to decouple compute from storage. In this technique:

  1. Most data remains in cloud storage, which basically offers infinite scalability of the data at relatively attractive pricing.
  2. Computational resources are multi-tenant and fully elastic. They scale with query traffic.

In this architecture, a client with a lot of data and a low query throughput will pay mostly for storage, while a client with high volumes of traffic will pay mostly for compute resources (and networking). When there is no traffic, no compute resources are needed. This configuration answers both scale and resource efficiency requirements.

What Is ElastiCache Serverless?

ElastiCache Serverless is a serverless version of ElastiCache, which is a managed Redis service. It gives AWS users the ability to set up a Redis service that is provisioned, scaled, and managed by AWS. Developers using ElastiCache Serverless do not need to think about provisioning for peak traffic, sharding, rebalancing, snapshotting, and all other operations of managing a Redis deployment.

The challenge of delivering a serverless in-memory database is far more complicated than with traditional databases. To start with, compute and storage (in this case, memory) cannot be decoupled. There is no low-priced, infinite-memory service available in the cloud. While Amazon has not disclosed how they solved this challenge, a common approach is to add a proxy that will handle most of the compute and have a second layer of instances holding the memory. The downsides of this architecture, when compared to a traditional in-memory offering, are increased latency, limited scalability, and since memory is expensive and needs to be always on - it gets expensive really quickly.

How Is ElastiCache Serverless Priced?

Since ElastiCache Serverless must always keep the data in memory even when you do not query the service, memory becomes the predominant component in your billing. ElastiCache Serverless is priced based on the GB of data stored (which happens to be the same way we price Dragonfly Cloud). They charge $0.125 per GB per hour (i.e., $90 per GB per month) as well as $0.0034 per million ECPU (1 ECPU = 1 KB of data transfer for both reads and writes). What does this look like in practice when compared to ElastiCache On-Demand?

For small workloads, the price difference is not dramatic. Let's take an example workload with 4GB of memory and 100,000 max queries per second. Using ElastiCache On-Demand, you could run this on a cache.m7g.xlarge (this is a 13.88GB instance, but you must over-provision for ElastiCache with Redis, so this is your best option) and pay ~$230/month. This same workload on ElastiCache Serverless would cost you $360/month for storage plus ECPU costs (this can vary wildly). An extra $130 a month to not have to think about provisioning any infrastructure might still make sense here.

Now, let's take a slightly larger example workload of 100GB of memory and 100,000 max queries per second. In this case, on ElastiCache On-Demand, you could run on a cluster with three instances of cache.r6g.2xlarge (170.16GB of total memory) for ~$1,800/month or pay more than $9,000/month for ElastiCache Serverless. Is the provisioning pain worth an extra $7,200/month?

For truly large workloads of, say, 800GB, ElastiCache Serverless would cost you more than $72,000/month. With ElastiCache On-Demand, you could operate a cluster with 16 instances of cache.m7g.4xlarge (897.76GB of total memory) for ~$15,000/month.

Workload ElastiCache On-Demand ElastiCache Serverless
4GB ~$230/month $360/month (excluding ECPU cost)
100GB ~$1,800/month $9,000/month (excluding ECPU cost)
800GB ~$15,000/month $72,000/month (excluding ECPU cost)

Conclusion

ElastiCache Serverless is an exciting product offering, but it's clear that AWS has not designed this service for heavy data workloads. The pricing simply makes no sense. If you are running a small cache and want to get up and running quickly, ElastiCache Serverless is probably a really great option for you. It's also a great solution for applications with little data but spiky traffic. However, if your application requires more than 10GB or 20GB of memory, serverless is not designed or priced for you, and you should look elsewhere.


Appendix: Pricing Details

  • ElastiCache pricing can be found here.
  • Our calculation is based on the AWS US East (Ohio) region as of December 2023.

ElastiCache Serverless as of December 2023

Pricing Dimension Price
Data Stored $0.125 / GB-hour = $90 / GB-month
ElastiCache Processing Units (ECPUs) $0.0034 / million ECPUs

ElastiCache On-Demand as of December 2023

Cache Node Type vCPUs & Memory Price
cache.m7g.xlarge 4 vCPUs, 12.93GiB = 13.88GB $0.230/hour = $229.95/month
cache.m7g.4xlarge 16 vCPUs, 52.26GiB = 56.11GB $1.257/hour = $917.61/month
cache.r6g.2xlarge 8 vCPUs, 52.82GiB = 56.72GB $0.821/hour = $599.33/month
AWS Database Data (computing)

Published at DZone with permission of Oded Poncz. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases
  • Simplify Database Geo-Redundancy Backup With Cloud Storage Services
  • Data Migration from AWS DocumentDB to Atlas on AWS
  • Reporting in Microservices: How To Optimize Performance

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!