1

Azure Cache for Redis

 7 months ago
source link: https://techcommunity.microsoft.com/t5/azure-paas-blog/leveraging-redis-insights-for-azure-cache-for-redis/ba-p/4054484
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Leveraging Redis Insights for Azure Cache for Redis

Leveraging Redis Insights for Azure Cache for Redis
Published Feb 13 2024 01:08 AM 561 Views

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: 

thumbnail image 1 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

Non-SSL Port: 

thumbnail image 2 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

Enterprise Cache:

thumbnail image 3 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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. 

thumbnail image 4 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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. 

thumbnail image 5 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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

thumbnail image 6 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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. 

thumbnail image 7 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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.  

thumbnail image 8 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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.

thumbnail image 9 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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. 

thumbnail image 10 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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

thumbnail image 11 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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. 

thumbnail image 12 of blog post titled                                              Leveraging Redis Insights for Azure Cache for Redis

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! 


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK