Loading...

Leveraging Redis Insights for Azure Cache for Redis

Image

The blog talks about how to leverage Redis Insights GUI tool while working with Azure Cache for Redis. We will look at some of the option what will help us with some high-level connectivity troubleshooting and insights to our data present inside the cache. 

 

To start with, we can leverage this for testing the connectivity to our Redis cache instance. After clicking on Add Redis Database button, we can fill in the other fields ahead: 

 

Host: Complete FQDN or the completed Redis cache Endpoint  

For Basic, Standard & Premium Tier - <Cachename>.redis.windows.net 

For Enterprise Tier - <Cachename>.<regionname>.redisenterprise.cache.azure.net 

Port: 6380 or 6379 (depending on whether we are testing for SSL or non-SSL port respectively) / 10000 for Enterprise Tier 

Database Alias: Cache name 

Password: Access Key for your cache 

Use TLS: Option to be checked for testing with 6380 port and also Enterprise Tier cache. 

 

Post that, we can click on Test Connection button which will help us doing a high-level check whether the cache endpoint is reachable or not. 

SSL Port: 

Amrinder_Singh_0-1707719879488.png

 

Non-SSL Port: 

Amrinder_Singh_1-1707719898149.png

 

Enterprise Cache:

Amrinder_Singh_2-1707720709004.png

Once the test connection is successful, you can click on Add Redis Database to start exploring the insights of your cache instance. 

 

Note: All the above demo has been done without any kind of firewall, private endpoints or VNET restrictions. In case you are having VNET or private endpoints configured, then you have test it from a VM which is part of the VNET configured. 

 

On clicking My Redis Database option, it will list down all the databases you have connected too from the Redis Insights along with some high-level details such as modules if any for the enterprise tier or OSS Cluster as connection type if clustering policy selected was OSS. If Enterprise, it shows as Standalone only. 

Amrinder_Singh_3-1707720738623.png

 

For this Demo, we took an empty cache and the below snippet demonstrate on how your can-do simple Set operations or add a key to your cache instance. We can add a new key by providing the key type such as Set, String, List, Hast etc, Key name, TTL etc. 

Amrinder_Singh_4-1707720751411.png

 

We have added 3 keys initially and it will start reflecting in the left-hand window section as depicted below:  

Amrinder_Singh_5-1707720766300.png

 

Similarly, we added the keys further and all of them started listing. Selecting any of the keys shall provide insights to that particular key on the right sight window such as value, TTL , key size etc. 

Amrinder_Singh_6-1707720938605.png

 

You can also use this to do any kind of pattern match as well. E.g. In the below snippet, we tried listing all the keys that start key name as testkey 

Amrinder_Singh_0-1707816306798.png

 

There is a Bulk Actions button available as well which has mainly 2 option available: 

  1. Perform bulk deletion. 
  2. Execute multiple set of Redis commands in a sequential format which can be uploaded as a plain text file. 

 

Moving ahead, there is an Analysis Tool option which can be leveraged to gain insight to the data summary residing in our cache. There is a New Report button which will generate a report providing various kind of insights on data residing in the cache. Below are some of the highlights: 

 

It provides a high-level summary key based on type.

Amrinder_Singh_1-1707816394209.png

It gives you a view of how much data in under No Expiry (no TTL set) and is expected to get freed in expected time (based on TTL set). In the below example, it points around ~450 bytes of memory to get freed in less than an hour while there is approx. ~1200 bytes of data which don’t have any kind of TTL set and will not expire. 

Amrinder_Singh_2-1707816484740.png

 

It further provides high level details of top keys based on TTL or Key size which can be used to identify larger size keys. 

Amrinder_Singh_3-1707816532192.png

 

There is also a Workbench option that provides a command line option like Redis CLI, using which we can execute commands. In the below example, we have used it to do PING-PONG test, set up the keys and other operations too. 

 

Disclaimer: Please note that tool is supported by REDIS and not Azure cache for Redis so we don’t control the behavior or features for the tool.  

 

Hope that helps! 

 

 

Learn more
Author image

Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related

Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!

* Yes, I agree to the privacy policy