In-Memory Caching Flashcards
What is DynamoDB DAX?
o DynamoDB Accelerator (DAX) is an in-memory cache, working from inside a VPC, designed specifically for DynamoDB. Results delivered from DAX are available in microseconds, rather than the single-digit milliseconds available from DynamoDB
o Cannot be used for strongly consistent reads – all reads will be eventually consistent; also, not ideal for high writes applications (it only support reads)
o DAX maintains 2 distinct caches: the item cache and the query cache.
o The Item Cache is populated with the results from GetItem and BatchGetItem, and has a 5-minute default TTL
o The Query Cache is populated with the results from Query and Scan operations and caches based on the parameters specified
What is ElastiCache?
o ElastiCache is a managed in-memory data store supporting the Redis or Memcached engines
o It is used for 2 common use cases:
Offloading DB reads by caching responses, improving application speed and reducing costs
Storing user session state, allowing for stateless compute instances (used for fault-tolerant architetures)
o Generally, ElastiCache is used with key-value databases or to store simple session data, but it can also be used with SQL DB engines