Building Azure Redis Cache

Let’s go through a Redis build process. It will be fun.

Within Azure find Redis / search for it.

Fill in the basics (location should be where your app is)

Key bit to get to the different editions is to click on the pricing details hyperlink (if Microsoft reads this please have a “configure” section – makes the experience nicer)

This is where we can select the tier you want ( the previous blog post summarised the different types)

Remember – basic should never be used for production. Also, if you need dedicated service then you will not want C0 because this is based on shared infrastructure. Redis can get expensive but could be cost – effective especially if you design to use a multi app approach per cache.

I select P1 – Premium with 6GB cache just to talk a couple things through.

From a networking perspective you will likely opt for private link.

The next section is about the build.

Lets discuss this section. Remember I used premium this means I have the ability to increase my shard counts. I opt for 2 means I have 12Gb cache avaliable, this will increase costs.  Obviously the main benefit is more GBs but also gives you the ability to continue operations when a node is experiencing failures or are unable to communicate with the rest of the cluster, and more throughput capability. You can have up to 10 shards in the cluster.

Also notice for more availability I decide to use 3 availability zones, you can actually select 1 or 2. If you opt for a persistent storage strategy then you need Azure Storage and ideally you will want to access that without keys but via Managed Identity. Why would you want to persist data?  Well if complete hardware failure occurs and all caches are offline if we use the persistent storage we can reconstruct it from the most recent snapshot, this is called RDB persistence, there is something else called AOF where all writes are saved to a log and rebuilt from that. Check out this document on in-depth analysis on the pros and cons https://redis.io/topics/persistence#aof-advantages

Now we are ready to create.

3 thoughts on “Building Azure Redis Cache

  1. Pingback: Dew Drop – March 23, 2022 (#3648) – Morning Dew by Alvin Ashcraft

  2. Pingback: Creating an Azure Redis Cache – Curated SQL

  3. Pingback: .NET, Architecture, Azure, And other links #21 Gossip on .NET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s