How to monitor Redis / Cache in Azure

June 8, 2020

As Microsoft says, “Monitoring is the act of collecting and analyzing data to determine the performance, health, and availability of your business application and the resources it depends on”.

An effective monitoring strategy will help you understand the detailed operation of the different components of your application and increase your up time by proactively notifying you of critical issues so that you can resolve them before they become problems.  Also, an effective strategy requires that the set-up and maintenance of the monitoring is automated, lightweight and does not require significant manual resources.

About Redis Cache

Azure Cache for Redis provides an in-memory data store based on the open-source software Redis. When used as a cache, Redis improves the performance and scalability of systems that rely heavily on backend data stores. Performance is improved by copying frequently accessed data to fast storage located close to the application. With Azure Cache for Redis, this fast storage is located in-memory instead of being loaded from disk by a database.

Azure Cache for Redis can be used as a distributed data cache, a session store, and a message broker. Application performance is improved by taking advantage of the low-latency, high-throughput performance of the Redis engine.

Azure Cache for Redis offers access to a secure, dedicated Redis cache. It is managed by Microsoft, hosted on Azure, and accessible to any application within or outside of Azure.

Using Azure Cache for Redis

Azure Cache for Redis improves application performance by supporting common application architecture patterns. Some of the most common include the following:

Pattern Description
Cache-Aside Databases are often too large to load directly into a cache. It is common to use the cache-aside pattern to load data into the cache only as needed. When the system makes changes to the data, the system can also update the cache, which is then distributed to other clients. Additionally, the system can set an expiration on data, or use an eviction policy to trigger data updates into the cache.
Content Caching Many web pages are generated from templates that use static content such as headers, footers, banners. These static items shouldn't change often. Using an in-memory cache provides quick access to static content compared to backend datastores. This pattern reduces processing time and server load, allowing web servers to be more responsive. It can allow you to reduce the number of servers needed to handle loads. Azure Cache for Redis provides the Redis Output Cache Provider to support this pattern with ASP.NET.
User session caching This pattern is commonly used with shopping carts and other user history data that a web application may want to associate with user cookies. Storing too much in a cookie can have a negative impact on performance as the cookie size grows and is passed and validated with every request. A typical solution uses the cookie as a key to query the data in a database. Using an in-memory cache, like Azure Cache for Redis, to associate information with a user is much faster than interacting with a full relational database.
Job and message queuing Applications often add tasks to a queue when the operations associated with the request take time to execute. Longer running operations are queued to be processed in sequence, often by another server. This method of deferring work is called task queuing. Azure Cache for Redis provides a distributed queue to enable this pattern in your application.
Distributed transactions Applications sometimes require a series of commands against a backend data-store to execute as a single atomic operation. All commands must succeed, or all must be rolled back to the initial state. Azure Cache for Redis supports executing a batch of commands as a single transaction.


Source: Microsoft

Why Monitor Azure Redis Cache?

As explained above, Redis Cache is used to improve application performance in many important or critical business applications.   As Redis Cache is used in business processes to support productivity and revenues for organizations it is important to monitor performance and availability.  Redis Cache is often used in conjunction with several other Azure services.  The monitoring challenge becomes important due to the elasticity, dynamic nature and the number of resources deployed which makes traditional manual / static monitoring impractical if not impossible.

Monitoring Azure with Azure's tooling is difficult

Monitoring in Azure is primarily provided by Azure Monitor which provides common stores for storing monitoring data, multiple data sources for collecting data from the different tiers supporting your application and features for analyzing and responding to collected data.

Monitoring Azure with Microsoft's built in tooling is difficult because:

1. The data is all over the place
2. Setting up monitoring and alerting is a manual job
3. Maintenance is time consuming
4. Relies mostly on traditional reactive monitoring
5. Does not efficiently solve silo challenges across cloud and on premise systems

As a consequence monitoring with the built in Microsoft tools tends to fall into the same traps as other antiquated tools that sets your organization up for failure.

You can read more about monitoring of Azure with Microsoft's tools here.

Why you should consider using AIMS to Monitor Azure Redis Cache?

AIMS is built on the fundamental value proposition of automating monitoring and insight into increasingly complex enterprise IT systems with a focus on the applications or business processes supported. With Azure, the number of applications – or services – explodes taking the growth in complexity from linear to exponential.

Each of the services or applications requires monitoring of relevant performance metrics. Taking the number of services, systems or applications from tens to thousands with cloud means that you should expand the metrics you monitor by a similar factor – that is probably about 100-fold. That cannot be done by adding manual monitoring or human resources.

Normal behavior

Monitoring of this complexity needs to be done by using machine learning and algorithms. AIMS’ monitoring for Azure fetches all relevant performance metric for each IaaS or PaaS in Azure. For each service we fetch all available metrics in real time and AIMS build normal behavior patterns for each metric. This normal behavior metric represents the cyclicality of your business by different time resolutions – minutes a day, hour per day or day per week. This means that AIMS builds a digital DNA of how your business lives – represented through these normal behavior patterns.  (see image below for example)

normal behavior


Now, with this digital DNA that consist of thousands of normal behavior patterns AIMS will monitor in real time the current performance vs the patterns build while also dynamically updating the normal behavior patterns with the new performance data fetched. The effect is that all available metrics are monitoring in real time vs the normal behavior pattern.

For Redis Cache AIMS fetch and build normal behavior patterns for the following metrics:

  • Used Memory
  • Total Keys
  • Operations Per Second
  • Gets
  • Cache Write
  • Used Memory Percentage
  • Cache Read
  • Billing Redis Cache
  • Cache Latency Microseconds
  • Expired Keys
  • Connected Clients
  • Sets
  • Errors
  • Billing Redis Cache Daily Cost
  • CPU
  • Used Memory RSS
  • Evicted Keys
  • Cache Hits
  • Cache Misses
  • Total Operations


Using normal behavior patterns, AIMS identifies anomalies on each single metric vs normal behavior and correlates the anomalies across the rest of the metrics to create Anomaly Warnings.
Anomaly Warnings provide early notification of trouble with Azure Services or across cloud / hybrid environments.

anomaly warning

You can also use the “Activity & changes” module in the Analytics tab to create reports & dashboards to identify new resources & applications in Azure, which allows early identification of new resources and applications in Azure to ease insight and transparency.
AIMS will do all this without you needing to manually intervene, and there are no static thresholds needed!

AIMS Redis Cache reports & dashboard
All the data collected by AIMS is available to users in the Analytics section that allows you to access default reports or to create custom reports and dashboards. When creating your first report, you will discover that the AIMS Analytics consists of a wide range of possibilities. You can create public or private reports, set a report as a dashboard and define which users will receive dashboard reports.
AIMS stores performance data, making it a valuable data source for later use – such as for root-cause analysis.  More about reports, dashboards and analytics.

So, summing up: with AIMS you can automate monitoring of your Azure IaaS and PaaS through a easy configuration that can be done in minutes. This will allow you to free up valuable time spent monitoring using other tools or manual monitoring. The consequence is that you will have better monitoring and more time to deliver projects for your business.

Learn more about how to use AIMS to monitor Redis Cache or sign up for the free Community Edition and test it out for yourself.

Topics from this blog: Blog



BizTalk: Undiscovered secret of DTA purge and Archive stored procedure

DTA Database is one of the most important databases in the BizTalk DB component. The issue in this database can cause a lot of performance issues in BizTalk. To keep the DB healthy, Microsoft...

Recovery of Master Secret Server

As a part of the recovery process during DR (Disaster Recovery) or any other unforeseen scenarios, one might have to restore the master secret to re-use the existing setup and data. This article will...

AIMS teams up with the Norwegian Computing Center to make predictions to alert of a possible problem even before the problem itself arises

At AIMS, we strive to alert as early as possible that some problem is arising for a business-critical system. We want to arrive as far as to make predictions to alert of a possible problem even...