AWS has introduced MemoryDB, a Redis-compatible database manager that combines in-memory performance with persistence.
Redis (Remote Dictionary Server) is an in-memory key-value database manager sometimes thought of as a cache – but MemoryDB uses a distributed transactional log so that the database is durable as well as fast.
“You can use MemoryDB as a single, primary database service for your workloads requiring low-latency and high throughput instead of separately managing a cache for speed and an additional relational or nonrelational database for reliability,” say the docs.
The trade-off is that writes are slower than with ElastiCache, an existing managed Redis offering from AWS. The company said that MemoryDB has “single-digit millisecond write latencies” whereas ElastiCache has “microsecond latencies for both reads and writes.”
Redis is an open-source product under a BSD licence. The Redis core team includes three from Redis (the company), one from Alibaba, and one from AWS. Last month Matt Asay, AWS head of developer marketing and open source, along with Partner Solutions architect Anthony Prasad Thevaraj, puffed about how “AWS and Redis Labs partner to make a better Redis,” though added that AWS competes with the Redis company “for Redis workloads.”
The presence of AWS engineer Madelyn Olson on the core team was praised as reflecting “a reality of how open source works, when done well.”
That “better Redis” now appears to mean creating a new product that is not open source, though MemoryDB retains compatibility with Redis data types and APIs.
The open-source Redis already has an option for persistence called Append Only Files (AOF), though this is off by default in ElastiCache, the pre-existing AWS Redis service, and is not supported at all in Redis versions higher than 2.8.22 on ElastiCache, though the feature still exists in open-source Redis and in Redis Enterprise, the official paid-for version.
The Redis company, formerly called Redis Labs but now just Redis following an announcement earlier this month, seems more ambivalent about the relationship with AWS. In December 2019, developer advocate Loris Cro said that “the prevalence of ElastiCache has created a split in the community of Redis users. The people who experience Redis only via AWS are seeing an incomplete vision of the open source project’s direction and benefits … yes, Redis is a great caching solution, but you can do so much more with it.”
Cro’s suspicion was that “in the case of Redis, the feature disparity effectively relegates the most loved database by developers worldwide to being primarily a caching front-end for the databases that AWS wants its customers to use.” The introduction of MemoryDB perhaps now adds another database to that list – but it is not Redis.
MemoryDB Data is encrypted at rest and accessed using TLS (Transport Layer Security). Clusters support Graviton 2 (ARM-based) nodes which additionally has encrypted memory. The product supports up to 500 nodes and more than 100TB of storage per cluster. MemoryDB is available now in US East, EU (Ireland), Asia Pacific (Mumbai) and South America (Sao Paulo), with more regions promised soon. Pricing is based on nodes used, charged per hour from $0.344 for the smallest node type up to $10.991 for the largest, plus $0.20/GB for data written and additional fees for snapshot storage beyond a minimal amount.
AWS billing consultant Corey Quinn does not think Redis needs to worry. “Amazon MemoryDB for Redis may be the worst @awscloud service ever launched from virtually any perspective you care to name,” he said on Twitter, noting that “instead of fixing/expanding their existing managed Redis service, @awscloud launched a brand new service instead.”
Quinn describes the data write fee as a “monstrous 20¢ per GB charge,” and found that a default experiment he created would cost $2,000 per month, concluding: “MemoryDB is the absolute best sales pitch for Redis that I have ever seen.”
Another user noted that “since MemoryDB for Redis doesn’t (currently) provide support for Redis modules, it’s a lot less compelling [than] Redis Enterprise, which does.”
All that said, the combination of in-memory performance with reliable durability is inherently attractive and less complex than using Redis as a cache in front of another database manager. A question to ponder is whether MemoryDB is an example of “how open source works, when done well.” ®