Monitoring DynamoDB caching
In addition to the metrics supported by Amazon ElastiCache Serverless, Amazon DynamoDB caching emits additional metrics to enable monitoring and alarm creation for cache integration behavior. For information about accessing ElastiCache metrics through Amazon CloudWatch, see Monitoring use with CloudWatch Metrics. For the list of metrics published for a serverless cache, see ElastiCache Serverless.
Topics
DynamoDB caching cluster-level metrics
Cluster-level metrics include the following dimension.
| Dimension | Valid values | Description |
|---|---|---|
|
Cache identifier |
Identifies the cache emitting the metric. |
DynamoDB caching publishes the following cluster-level metrics.
| Metric | Description | Unit |
|---|---|---|
|
Number of request errors returned. |
Count |
|
Average read latency for BatchGetItem and BatchWriteItem requests. |
Microseconds |
|
Average read latency for TransactGetItems and TransactWriteItems requests. |
Microseconds |
DynamoDB caching table-level metrics
Table-level metrics include the following dimensions.
| Dimension | Valid values | Description |
|---|---|---|
|
Cache identifier |
Identifies the cache emitting the metric. |
|
DynamoDB table name |
Identifies the DynamoDB table to which this metric applies. |
|
GetItem, BatchGetItem, Query, Scan, PutItem, UpdateItem, DeleteItem, BatchWriteItem, TransactGetItems, TransactWriteItems |
Identifies the DynamoDB operation to which this metric applies. |
DynamoDB caching publishes the following table-specific metrics.
| Metric | Description | Unit |
|---|---|---|
|
Number of DynamoDB read requests served from cache. |
Count |
|
Number of DynamoDB read requests not found in the cache and served from DynamoDB. |
Count |
|
The ratio of DynamoDB read requests served from the cache, from 0.0 to 1.0. |
Count |
|
Number of DynamoDB item write requests. |
Count |
|
Number of cached DynamoDB item entries with at least one projection populated by a write request. |
Count |
|
Number of cached DynamoDB projection entries populated for each item write. |
Count |
|
Number of cached DynamoDB item entries with at least one projection invalidated by a write request. |
Count |
|
Number of DynamoDB read requests that received a negative cache response. |
Count |
|
The total time elapsed between the cache receiving a DynamoDB request and sending a response. |
Microseconds |
Metric counts are incremented once for each entry in batch (BatchGetItem, BatchWriteItem) and transaction (TransactGetItems, TransactWriteItems) operations. If a BatchGetItem request for 20 items is returned entirely from cached entries, the DynamoDBCachingHits metric is incremented 20 times.
Recommended alarms
We recommend that you create Amazon CloudWatch alarms on the following metrics.
-
DynamoDBCachingHitRatebelow your expected baseline might indicate TTLs that are too low or a change in workload. -
DynamoDBCachingRequestErrorssustained above zero might indicate that the cache is failing to communicate with DynamoDB, for example because of missing IAM permissions or throttling.
Related DynamoDB metrics
Because DynamoDB caching reduces the request volume that reaches DynamoDB, we recommend that you also monitor the corresponding DynamoDB table-level metrics to confirm the expected change in your workload usage after you enable DynamoDB caching. These metrics include the following:
-
ConsumedReadCapacityUnits -
ThrottledRequests -
SuccessfulRequestLatency