Azure Cache for Redis

Azure Cache for Redis is a fully managed, in-memory data store that provides high throughput and low-latency access to your data. It's based on the popular open-source Redis project. This service enables you to build highly scalable and responsive applications by caching frequently accessed data, session state, and messages.

Key Benefits: High performance, scalability, security, managed service, compatibility with open-source Redis.

What is Azure Cache for Redis?

Azure Cache for Redis acts as a distributed in-memory cache. It sits between your application and your data stores (like databases) to reduce the load on those stores and dramatically improve response times. Common use cases include:

Getting Started with Azure Cache for Redis

Setting up Azure Cache for Redis is straightforward. You can provision a cache instance through the Azure portal, Azure CLI, or Azure Resource Manager templates.

Provisioning a Cache Instance

Follow these steps to create a new Azure Cache for Redis instance:

  1. Navigate to the Azure portal.
  2. Click on "Create a resource".
  3. Search for "Azure Cache for Redis" and select it.
  4. Click "Create".
  5. Fill in the required details: Subscription, Resource Group, Cache Name, Region, Pricing Tier, and Clustering settings.
  6. Review and create your cache instance.

Connecting to Your Cache

Once provisioned, you'll need connection strings to access your cache from your applications. You can find these in the "Access keys" section of your Redis cache resource in the Azure portal.

The primary connection string format is typically:

redis://:6379/?password=

You can also use the secondary access key. For TLS/SSL enabled caches, the URL will start with `rediss://`.

Common Redis Commands

Azure Cache for Redis supports most of the standard Redis commands. Here are a few common ones:

Tip: Always set an expiration time (TTL) for your cached items to ensure data freshness.

Advanced Features

Pricing Tiers

Azure Cache for Redis offers several pricing tiers to meet different performance and feature requirements, from the basic `Basic` tier for development and testing to the `Enterprise` and `Enterprise Flash` tiers for demanding production workloads. Each tier offers varying levels of throughput, memory, and features like clustering and persistence.

For detailed pricing information, refer to the official Azure pricing page.

Important: Choose the pricing tier that best matches your application's performance needs and budget. Consider scalability needs when selecting a tier.

Learn More