redis.keyspace.avg_ttl
Average TTL of keys with an expirationDimensions:None
Summary
Average TTL in milliseconds across all keys with expiration set in a database. This metric helps validate that TTL settings align with data lifecycle requirements. Unexpectedly high averages may indicate TTLs are too long, causing memory bloat, while very low averages could mean cache entries expire before being useful. Track trends to detect configuration drift or application changes affecting key lifetime management.
Interface Metrics (3)
Sources
Related Insights (1)
Expiring Keys Without TTL Monitoring Causes Memory Leakswarning
When redis.persist count is high relative to redis.db.expires, many keys lack TTLs and will accumulate indefinitely, causing memory growth. redis.keyspace.avg_ttl can indicate if TTL values are too long for workload patterns.
▸