Momento announces $15M Series A funding. Topics event bus released for general availability. Read more →
January 5, 2023 - 4 Min Read

Database caching: Outdoing DAX with the serverless solution DynamoDB deserves

Don’t let a serverfull cache hold your database back.

Khawaja Shams
Author
Pete Naylor
Author

Share

As a truly serverless solution, Momento Cache is the best cache for DynamoDB. When using DynamoDB, you need a cache that can keep up on developer experience, availability, scale, elasticity, and costs. Creating a DynamoDB table that can handle millions of RPS is as simple as calling a single API: createTable(). All the complexity is abstracted away. Momento delivers a similar experience with the createCache() call. No worrying about instances, shards, replicas, etc.—and no maintenance windows. DynamoDB also works with and without VPCs; Momento emulates the same developer experience. Additionally, while DynamoDB scales with mission-critical availability, it also scales to zero on costs. You can run a highly available table and only pay for what you use. Momento Cache has similar demand-based pricing: it costs zero dollars to try and zero heartache to operate.

DAX promises this kind of seamless acceleration of DynamoDB tables with a simple change of endpoint. Unfortunately, it’s not seamless—in large part because it is not serverless.

5 reasons why DAX should be replaced with a serverless solution 

  1. To restate the obvious, DAX is not serverless. This means it is expensive, does not scale elastically, requires complex configurations, and has maintenance windows, all of which suggest availability implications worth evaluating. If your DAX endpoint is down, your application is down. Yes, you can mitigate this by adding logic in your client, but that adds seams in the integration experience.
  2. DAX has its own protocol, which is a reasonable optimization over DynamoDB’s verbose JSON-based wire protocol—but this has some downsides. It requires special binaries, and you can’t just use existing SDKs with a different endpoint.
  3. Since it requires special binaries, DAX is not supported across all languages (or latest versions of SDKs).
  4. DAX has a ceiling on scale and limited elasticity. With a single-writer architecture—and up to 10 read replicas—you are limited to the write throughput of a single node. This has serious availability implications; it’s easy to get it wrong. At best, you increase your latencies beyond what DynamoDB would have given you. At worst, you have a serious outage. 
  5. DAX isn’t keeping up with the pace of innovation at DynamoDB: it doesn’t support any instance types launched since mid-2018, it’s not supported in every region, it doesn’t properly support all the common programming languages, and it doesn’t support all the features of DynamoDB (PartiQL, for example).

A serverless cache for a serverless database

If you are going to use a separate binary, a separate endpoint, and not have support in every SDK, you may as well use a serverless cache that is worthy of accelerating DynamoDB. A truly serverless cache requires no provisioning, scales seamlessly, has no maintenance windows, and has a pay-as-you-go pricing model that stands to actually save you money on your DynamoDB usage, while accelerating your responses. Momento Cache does just that! If you pair your DynamoDB workflow with Momento Cache, you can improve your latencies by up to 60%—without compromising your availability, your wallet, or your sanity dealing with constant scaling battles with the serverfull alternatives. 

These are bold claims—but you don’t have to take our word for it. Check out this blog from Ellery Addington-White, where he takes you through a simple open-sourced and repeatable example of Momento Cache making DynamoDB faster. Don’t believe me? Checkout how Ellery was able to accelerate his DynamoDB workflows with one line of code.

Try it for yourself—and let us know if you still prefer DAX over Momento Cache.

Share