Search code examples
amazon-web-servicesamazon-dynamodbamazon-elasticacheamazon-efsamazon-dynamodb-dax

AWS Ultra Low Latency Read/Write Data Store: EFS vs Dynamodb DAX vs ElastiCache


My web application requires extremely low-latency read/write of small data blobs (<10KB) that can be stored as key-value pairs. I am considering DynamoDB (with DAX) and EFS and ElastiCache. AWS claims that they all offer low latency but I cannot find any head-2-head comparison and also it is not clear to me if these three are even on the same league. Can someone share any insight?


Solution

  • You are trying to compare different storage systems for different use cases with different pricing models.

    EFS is a filesystem for which you don't need to provision storage devices and can access from multiple EC2 instances. EFS might work fine for your use case, but you will need to manage files. Meaning you will need to structure your data to fit in files. Alternatively, you might need to build key-value or blob/object storage system depending on the level of structure and retrieval you need. There are products that solve this problem for you, such as S3, DynamoDB, Elasticache Redis or Memcached.

    S3 is a blob storage, with no structure, no data types, items can't be updated only replaced. You may only query by listing blobs in a bucket. It is typically used for storing static media files.

    DynamoDB is a non-relational (aka No-SQL) database, which can be used as a document or key-value store in which data is structured, strongly typed and has query capabilities. Can store items up to 400KB.

    Elasticache (Redis or Memcached) are key-value stores which are typically used as a cache in front of durable data store such as DynamoDB. In this case the application needs to be aware of the different layers; manage different APIs and handle the caching logic in the application.

    With DAX, you can seamlessly integrate a cache layer without having the caching logic in the application. DAX currently provides a write-through cache to DynamoDB. DAX APIs are compatible with DynamoDB APIs, which makes it seamless to add a cache layer if your application already uses DynamoDB by substituting DynamoDB client with DAX client. Keep in mind that DAX currently supports Java, Node.js, Go, .NET and Python clients only.

    So it really depends on your workload. If you require sub-millisecond latency, without the headache of managing a cache layer, and your application is Java, Node.js, Go, .NET or Python then DAX is for you.