The ElastiCache Serverless launch has gotten a ton of visibility (and debate on how serverless it is)! There are two key insights that I feel are easily overlooked: first, S3 One Zone Express may be a better serverless cache in certain scenarios than ElastiCache Serverless. Second, with the launch of ElastiCache Serverless, Amazon silently released replication for Memcached! This is a bigger deal than it may appear.
What is Memcached?
Memcached is a hyper-optimized key-value store. It is multi-threaded and scales incredibly well. It is typically underappreciated when compared to the visibility of Redis, but it is hard to beat on performance, tail latencies, and scale. Some of the biggest companies in the world are running their caching fleet entirely on Memcached or a variant of it, including but not limited to Facebook, Twitter, Netflix, and Pinterest.
What Memcached is not and why the world needs Redis
Redis offers a much richer set of primitives and functions than Memcached does. Redis has data structures, Lua scripting (which I highly recommend you stay away from), and replication! We often run into advanced caching users doing only key-value functionality of Redis - but picking Redis simply because it has a great multi-AZ replication story.
Enter ElastiCache Serverless: Leveling the replication playing field between Redis and Memcached
ElastiCache Memcached does not offer replication - so it is completely up to the application to mitigate the risk of data loss from node failure. ElastiCache Serverless for Memcached automatically replicates data across multiple AZs. This makes Memcached more appealing for the simple key-value use cases in Redis because you can drive more throughput out of the memcached instance of the same size. Now, you no longer have to pick between availability, throughput, and performance.
Does Momento use Memcached? How does it support replication?
Our Memcached support comes from Pelikan, Twitter’s reimplementation of Memcached, written entirely in Rust and optimized for tail latencies. Our proxy layer performs the replication for this engine, and it also doubles down as a way to warm up new nodes with data after node failure, deployments, or scaling events.
With Momento, you don’t have to worry about scaling delays, building another proxy layer to talk to your customers, or what version/type of engine you are using. Momento optimizes all of this on your behalf, leaving you with as close to zero config as possible (you still need to name your cache 😜).