I expected DynamoDB Accelerator (DAX) to be a transparent way to cache DynamoDB, making it faster and more resilient by simply changing the endpoint with minimal code changes required. Unfortunately, this ended up being far from reality. Like most developers, I would love to be able to perform experiments like adding a cache quickly (minutes) and without the price tag.
It takes me less than a minute to make a DynamoDB table—but I find myself overwhelmed with choices when making a DAX cluster. These choices include instance type, number of replicas, zones, VPCs (if I am not already in a VPC, I have to refactor my whole stack), etc. They stand in the way of my velocity as a developer and in the way of my business delivering a better end-user experience. Needless to say, none of this sounds transparent. Database caching should be easier.
Momento Cache is quick and easy to integrate with your stack. As you can see here, it lets you accelerate DynamoDB with just 5 lines of code. Reflecting on DAX, I wanted to make it even faster for developers to cache DynamoDB across their entire code base with just one line of code. Thanks to the power of middleware, I was able to do just that!
Momento Cache makes it easy (and free!) to quickly experiment with this to see how much it could help you optimize your databases. Try it right now!
So how did I make it work?
This also allows for a cleaner architecture, reducing the need to deploy into a VPC if using Lambda functions or deploying dedicated cache nodes that you have to pay for even when they’re idle. This approach would also be extensible to API calls to other AWS services. If you find “MAX” useful, let us know on Discord—we’ll keep building on it.