We are using DynamoDB global tables and planning to use DAX on the top of DynamoDB to enable caching. But I don't see any mention of how DAX invalidation will take place in multi-region setup.
For example, let's say there are 2 clusters, one in us-west-2 and one in us-east-2. If we update something in us-east-2 using the DAX client it's cache will be updated but while replicating the data to us-west-2, will global table update cache in us-west-2 as well? I don't see any mention of this in the DynamoDB documentation.
The DAX cache will not be updated. Global tables will replicate the data in other regions. However, it wouldn't update the cache. Even, the query cache
and item cache
are independent.
DAX does not refresh result sets in the query cache with the most current data from DynamoDB. Each result set in the query cache is current as of the time that the Query or Scan operation was performed. Thus, Charlie's Query results do not reflect his PutItem operation. This will be the case until DAX evicts the result set from the query cache.
Write through policy:-
The DAX item cache implements a write-through policy (see How DAX Processes Writes). When you write an item, DAX ensures that the cached item is synchronized with the item as it exists in DynamoDB. This is helpful for applications that need to re-read an item immediately after writing it. However, if other applications write directly to a DynamoDB table, the item in the DAX item cache will no longer be in sync with DynamoDB.
DAX Consistency
In the above statement, you can consider the other application
word as global table
replication. The DAX wouldn't aware about the replication done for the global table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With