Azure Cache for Redis instances with no connected clients and no operations for 30 days
What does ZopNight detect here?
ZopNight flags an Azure Cache for Redis instance when `connectedclients` and `operationsPerSecond` both stay below 1, on average and at peak, across at least 30 days, and the cache has a known cost. No application connected and no command ran, yet the cache kept billing its hourly tier and size rate. Deleting it recovers the full charge.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-1338 |
| Category | idle |
| Severity | medium |
| Metric | connectedclients, operationsPerSecond |
| Threshold | both < 1 (average and peak) |
| Evaluation window | 30d |
| Source | ZopNight |
| Permissions used | Microsoft.Cache/redis/read · Microsoft.Insights/Metrics/Read |
Where it applies
An idle cache is billed like a busy one
Azure Cache for Redis pricing is an hourly price per tier and cache size. Memory is reserved for you whether it holds data that anyone reads or not, so the bill of an abandoned cache is the same as the bill of a busy one.
There is also a timing reason to clean up now. Microsoft has announced a retirement timeline for all Azure Cache for Redis SKUs and recommends moving to Azure Managed Redis, as the notice on its reservation page states. An unused cache is one fewer instance to migrate.
Checking clients and commands on a cache
az redis list --query "[].{name:name, rg:resourceGroup, sku:sku.name, size:sku.capacity}" -o table
az monitor metrics list --resource <cache-resource-id> \ --metric connectedclients operationsPerSecond --offset 30d --interval PT24H --aggregation Average Maximumconnectedclients is the number of client connections; operationsPerSecond is the number of
commands executed per second.
Both signals below one, for a month
- The connected clients series and the operations series are both present.
- Each covers at least 30 days.
- Connected clients are below 1 on both average and peak.
- Operations per second are below 1 on both average and peak.
- The cache has a known monthly cost above zero.
A cache that one client connects to briefly each night shows it in the peak, and is not flagged.
Caches ZopNight leaves in place
Any client connection or operations above the floor clears the cache. A missing series or fewer than 30 days of data also means no finding. An older approach based on a connection tag that no system actually wrote was dropped, so the decision rests only on Azure Monitor data.
Premium caches that are busy and long-lived are a different question, covered by Azure Redis Cache Could Use Reserved Capacity.
Saving is the cache’s full hourly cost
saving = current monthly cost of the cachecost after fix = 0Deleting an unused cache
- Search application settings, Key Vault secrets and connection strings for the cache host name to confirm nothing depends on it.
- If the data might matter, export it first; otherwise treat it as disposable, since a cache is usually rebuilt from its source of truth.
- Delete it:
az redis delete --resource-group my-rg --name my-cache --yes.