Chat Zalo Chat Messenger Phone Number Đăng nhập
What is Azure Cache for Redis? | Microsoft Learn

What is Azure Cache for Redis? | Microsoft Learn

Azure Cache for Redis provides an in-memory data store based on Redis software. Redis improves the performance and scalability of an application that heavily uses back-end data stores. It is capable of processing large volumes of application requests by keeping frequently accessed data in server memory, which can be quickly written and read. Redis brings a critical low-latency, high-performance data storage solution to modern applications.

Azure Cache for Redis offers both Redis open source (OSS Redis) and a commercial product from Redis Inc. (Redis Enterprise) as a managed service. It provides secure, dedicated Redis server instances and full Redis API support. The service is operated by Microsoft, hosted in Azure, and usable by any application inside or outside of Azure.

Azure Cache for Redis can be used as a distributed content or data cache, session store, message broker, and more. It can be deployed independently. Or, it can be deployed alongside other Azure database services, such as Azure SQL or Azure Cosmos DB.

Key scenarios

Azure Cache for Redis improves application performance by supporting common application architecture patterns. Some of the most common include the following patterns: Pattern description

Data cache Databases are often too large to load directly into a cache. It is common to use the cache pattern to load data into the cache only when necessary. When the system makes changes to the data, the system can also update the cache, which is then distributed to other clients. In addition, the system can set data expiration or use an eviction policy to trigger cached data refreshes. Content caching Many web pages are generated from templates that use static content, such as headers, footers, banners. These static elements should not change frequently. Using an in-memory cache provides fast access to static content compared to back-end data stores. This pattern reduces processing time and server load, allowing web servers to be more responsive. It can allow you to reduce the number of servers needed to handle loads. Azure Cache for Redis provides the Redis output cache provider to support this pattern with ASP.NET. Session store This pattern is commonly used with shopping carts and other user history data that a web application might associate with user cookies. Storing too much in a cookie can have a negative effect on performance as the size of the cookie grows and is passed and validated with each request. A typical solution uses the cookie as a key to query data in a database. When using an in-memory cache, such as Azure Cache for Redis, associating information with a user is faster than interacting with an entire relational database. Queue work and messages Applications typically add tasks to a queue when the operations associated with the request take time to execute. Longer-running operations are queued to be processed in sequence, often by another server. This method of deferring work is called a task queue. Azure Cache for Redis provides a distributed queue to enable this pattern in your application. Applications sometimes require a series of commands against a backend data store to execute as a single atomic operation. All commands must succeed or all must revert to the initial state. Azure Cache for Redis supports running a batch of commands as a single transaction.

Versions of

Redis

Azure Cache for Redis supports OSS Redis version 4.0.x and 6.0.x. We have made the decision to skip Redis 5.0 to bring you the latest version. Previously, Azure Cache for Redis maintained a single version of Redis. In the future, it will provide a newer major version update and at least a previous stable version. You can choose which version works best for your application.

Service

levels

Azure Cache for Redis is available at these levels:

Basic tier description An OSS Redis cache that runs on a single virtual machine. This tier has no service level agreement (SLA) and is ideal for dev/test and non-critical workloads. Standard An OSS Redis cache that runs on two virtual machines in a replicated configuration. High-performance premium OSS Redis caches. This tier offers higher throughput, lower latency, better availability, and more features. Premium caches are deployed on more powerful virtual machines compared to virtual machines for basic or standard caches. High-performance enterprise caches powered by Redis Enterprise software from Redis Inc. This level supports Redis modules, including RediSearch, RedisBloom, RedisJSON, and RedisTimeSeries. In addition, it offers even greater availability than the Premium tier. Enterprise Flash Cost-effective large caches with Redis Enterprise software from Redis Inc. This tier extends Redis data storage to non-volatile memory, which is cheaper than DRAM, in a virtual machine. Reduces total memory cost per GB.

Feature

comparison

Azure Cache for Redis pricing provides a detailed comparison of each tier. The following table helps describe some of the features supported by the tier:

Feature Description Basic Standard Premium Enterprise Enterprise Flash Service Level Agreement (SLA) – Data in Transit ✔ ✔ ✔ ✔ ✔ Encryption Network isolation ✔ ✔ ✔ ✔ ✔ Scaling preview Preview OSS clustering – – Data persistence – – Preview Preview zone ✔ ✔ ✔ redundancy – – Geo-replication – – (Passive) ( Active) (Active) Connection audit logs – – (Probe-based) (Event-based) (Event-based) ✔ ✔ ✔ ✔ Redis Modules – – – Preview Import/Export – – Restart ✔ ✔ ✔ – – Scheduled updates ✔ ✔ ✔ – – ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Choose the right level

Consider the following options when choosing an Azure Cache level for Redis

: Memory: Basic and Standard tiers offer 250 MB – 53 GB;

The level

Premium 6 GB – 1.2 TB; Enterprise levels 12 GB – ✔ ✔ ✔ ✔

  • 14 TB. To create a Premium-tier cache larger than 120 GB, you can use Redis OSS clustering. For more information, see Azure Cache for Redis Pricing. For more information, see Configuring clusters for an Azure Premium cache for Redis.
  • Performance: Premium and Enterprise tier caches are implemented on hardware that has faster processors, providing better performance compared to Basic or Standard. Premium level caches have higher throughput and lower latencies. For more information, see Azure Cache for Redis Performance.
  • Dedicated core for Redis server: All caches except C0 run dedicated VM cores. Redis, by design, uses only one thread for command processing. Azure Cache for Redis uses other cores for I/O processing. Having more cores improves performance even if it does not produce linear scaling. In addition, larger VM sizes typically have higher bandwidth limits than smaller ones. This helps you avoid network saturation that causes application timeouts.
  • Network performance: If you have a workload that requires high performance, the Premium or Enterprise tier offers more bandwidth compared to Basic or Standard. Also, within each tier, larger caches have more bandwidth because of the underlying virtual machine hosting the cache. For more information, see Azure Cache for Redis Performance.
  • Maximum number of

  • client connections: The Premium and Enterprise tiers offer the maximum number of clients that can connect to Redis, offering a greater number of connections for larger caches. Clustering increases the total amount of network bandwidth available to a clustered cache.
  • High availability: Azure Cache for Redis provides several high availability options. It ensures that a Standard, Premium or Enterprise cache is available according to our SLA. The SLA only covers connectivity to cache endpoints. The SLA does not cover protection against data loss. We recommend that you use the Redis data persistence feature in the Premium and Enterprise tiers to increase resiliency against data loss.
  • Data persistence: Premium and Enterprise tiers allow you to retain cache data in an Azure Storage account and a managed disk, respectively. Underlying infrastructure issues can lead to potential data loss. We recommend that you use the Redis data persistence feature at these levels to increase resiliency against data loss. Azure Cache for Redis offers RDB and AOF (preview) options. Data persistence can be enabled through the Azure portal and CLI. For the Premium tier, see Configure persistence for an Azure Premium cache for Redis.
  • Network isolation

  • : Azure Private Link and Virtual Network (VNET) deployments provide enhanced security and traffic isolation for Azure Cache for Redis. The virtual network allows you to further restrict access by using network access control policies. For more information, see Azure Cache for Redis with Azure Private Link and Configure virtual network support for an Azure Premium cache for Redis.
  • Redis modules

  • : Enterprise tiers support RediSearch, RedisBloom, RedisTimeSeries, and RedisJSON (preview). These modules add new data types and functionality to Redis.

You can scale the cache from Basic to Premium after it has been created. Scaling out to a lower level is not currently supported. For step-by-step scaling instructions, see Scale Azure Cache for Redis and Scale Basic, Standard, and Premium tiers.

Special considerations for Enterprise tiers

Enterprise tiers are based on Redis Enterprise, a commercial variant of Redis from Redis Inc. Customers obtain and pay for a license for this software through an Azure Marketplace offering. Azure Cache for Redis handles license acquisition so you don’t have to do it separately. To purchase from the Azure Marketplace, you must have the following prerequisites:

  • Your Azure subscription has a valid payment instrument. Azure credits and free MSDN subscriptions are not supported.
  • Your organization allows purchases from the Azure Marketplace.
  • If you use a private Marketplace, it must contain the Redis Inc. Enterprise offering.

Availability by region

Azure Cache for Redis is continually expanding into new regions. To check availability by region, see Products available by region.

Next steps

Create an open source Redis cache Create a Redis Enterprise cache Use Azure Cache for Redis in a ASP.NET web app Use Azure Cache for Redis in .NET Core Use Azure Cache for Redis in the .NET Framework Use Azure Cache for Redis on Node.js Use Azure Cache for Redis in

  • Java Use Azure Cache
  • for
  • Redis
  • in Python

Contact US