2019-03-23 12:10 am
During my studies for Microsoft exams 70-486 and 70-487, one of the topics I’ve encountered is Redis Caching with Azure. I’ve never personally used this tool on a production application, but it’s always interesting to me how once you know about something it tends to pop up often in your universe. Since studying Redis caching, I’ve had one opportunity to recommend Redis Caching as a potential solution, and have heard of another conversation on a different team where Redis Caching was also a consideration.
Since Redis Caching has been so prevalent in my world lately, I wanted to take a moment to share a bit about how it all works, so that you might be able to leverage it in your next solution (should it be an appropriate choice, of course).
Redis is an open-source solution that can be used on Linux and OS X very easily, and, of course, can be hosted and run at Azure.Redis can be used as a database, as a message broker, and as cache.Redis supports common data structures, including lists, sets, and hashes, and has replication capabilities.There are more robust features available, such as transactions and some scripting, which can be used if desired.More detail about Redis can be found at these two links:
Introduction to Redis: https://redis.io/topics/introduction
Redis in the NoSQL ecosystem: https://dalibornasevic.com/posts/60-redis-in-the-nosql-ecosystem
One of the key uses I can see for Redis in the .Net development world, as well as on the exams, is the ability to leverage Azure Redis as a robust cache.Microsoft has excellent documentation on Redis Cache on Azure available here: https://azure.microsoft.com/en-us/services/cache/
The steps to integrate Redis caching at azure in a .Net solution are straight-forward
An awesome quick-start tutorial on using Azure Redis Caching can be found here: https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-dotnet-how-to-use-azure-redis-cache.
Some key points of note:
If you’d like, you can check out my code from the demo tutorial here: https://github.com/blgorman/Redis_Demo
Have you used Azure Redis Caching before? If so, how were your results?