Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Amazon DynamoDB Accelerator (DAX) Released in Preview: In-Memory Cache for Read-Intensive Workloads

Amazon DynamoDB Accelerator (DAX) Released in Preview: In-Memory Cache for Read-Intensive Workloads

Leia em Português

This item in japanese

AWS has released a public preview of Amazon DynamoDB Accelerator (DAX), a fully managed write-through caching service that sits logically in front of DynamoDB tables in order to improve performance for read-intensive workloads. DAX is API-compatible with DynamoDB, meaning that existing applications will not have to be re-written to take advantage of DAX. The preview edition currently only supports the Java SDK.

Amazon DynamoDB is a fully-managed and scalable NoSQL database service that supports both document and key-value store models. According to the AWS blog, DynamoDB is used within adtech, IoT, gaming, e-commerce, and finance, and some customers store more than 100 terabytes in a single DynamoDB table and make millions of read or write requests per second. DAX has been created to provide additional fast in-memory performance for demanding applications with eventually-consistent read-intensive workloads.

DAX addresses three core scenarios:

  • As an in-memory cache, DAX reduces the latency of eventually-consistent read workloads by an order of magnitude, from single-digit milliseconds to microseconds.
  • DAX reduces operational and application complexity by providing a managed service that is API-compatible with Amazon DynamoDB, and accordingly requires only minimal functional changes in order to be implemented within existing applications.
  • For read-heavy or bursty workloads, DAX provides increased throughput and potential operational cost savings by reducing the need to over-provision read capacity units. This is especially beneficial for applications that experience hot keys, or for read throughput for very large DynamoDB datasets in which read capacity units are equally distributed across partitions.

As a managed service, a DAX cluster is created via the AWS UI, and operational tasks such as software patching, cluster maintenance, replication, or fault management are handled automatically (a maintenance window can be specified). Each DAX cluster can contain 1 to 10 nodes, and nodes are added in order to increase overall read throughput. The cache size is based on the node size, ranging from dax.r3.large to dax.r3.8xlarge, which is specified when the cluster is initialised. Clusters run within a VPC, with nodes can be spread across Availability Zones (AZs).

The preview version of DAX currently only supports the API of the DynamoDB Java SDK, and a new DAX SDK for Java must be used to communicate with DAX. The AWS documentation states that this is because the SDK communicates with the cluster using a low-level TCP interface that is fine-tuned for low latency and high throughput. Support for access to DAX through other languages is on the product roadmap.

According to the DAX developer guide, positive use cases for this type of caching include:

  • Applications that require the fastest possible response time for reads.
  • Applications that read a small number of items more frequently than others. For example, to mitigate the impacts of a "hot" key and a non-uniform data distribution, read activity can be offloaded to a DAX cache.
  • Applications that are read-intensive, but are also cost-sensitive. DAX allows read activity to be offloaded from a DynamoDB table to a DAX cluster, thus reducing the amount of read capacity units that would be required otherwise.
  • Applications that require repeated reads against a large set of data. For example, a long-running analysis of data could temporarily consume all of the read capacity in a DynamoDB table, which would negatively impact other applications that need to access the same data. With DAX, the analysis can be performed against cached data instead.

DAX is not ideal for:

  • Applications that require strongly consistent reads, or cannot tolerate eventually consistent reads (however, DAX can be configured to refer back to the DynamoDB table when processing consistent reads).
  • Applications that do not require microsecond response times for reads.
  • Applications that are write-intensive, or that do not perform much read activity.
  • Applications that are already using a different caching solution with DynamoDB, and are using their own client-side logic for working with that caching solution.

The public preview of Amazon DAX is available today in the US East (Northern Virginia), US West (Oregon), and EU (Ireland) Regions. The public preview can be used at no charge. Additional information can be found in the DAX Developer Guide.

Rate this Article