Skip to main content
idle · azure

Azure Cache for Redis instances with no connected clients and no operations for 30 days

resource types
1
rule IDs covered
1
severity
medium

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

How ZopNight evaluates Azure Cache for Redis instances with no connected clients and no operations for 30 days.
Field Value
Rule IDsRC-1338
Categoryidle
Severitymedium
Metricconnectedclients, operationsPerSecond
Thresholdboth < 1 (average and peak)
Evaluation window30d
SourceZopNight
Permissions usedMicrosoft.Cache/redis/read · Microsoft.Insights/Metrics/Read

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

Terminal window
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 Maximum

connectedclients is the number of client connections; operationsPerSecond is the number of commands executed per second.

Both signals below one, for a month

  1. The connected clients series and the operations series are both present.
  2. Each covers at least 30 days.
  3. Connected clients are below 1 on both average and peak.
  4. Operations per second are below 1 on both average and peak.
  5. 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

Terminal window
saving = current monthly cost of the cache
cost after fix = 0

Deleting an unused cache

  1. Search application settings, Key Vault secrets and connection strings for the cache host name to confirm nothing depends on it.
  2. If the data might matter, export it first; otherwise treat it as disposable, since a cache is usually rebuilt from its source of truth.
  3. Delete it: az redis delete --resource-group my-rg --name my-cache --yes.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·