Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Brief introduction of Azure Redis of Azure Redis series

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Redis you must be aware that one of the most streamlined No SQL is used in many application scenarios, with high performance and anti-concurrency characteristics. Redis is also a commonly used service in Azure. Next, I'm going to write a short series of blog specifically to introduce the use of redis on Azure.

First of all, let's take a look at the common scenarios of Redis. Through this introduction, we can also see what kind of situations are suitable for using Redis services.

Mode specification cache side

Because the database can be large, it is not recommended to load the entire database into the cache. The cache-side mode is usually used, and data items are loaded into the cache only when needed. When the back-end data is changed, the cache distributed to other clients is also updated. In addition, the system can set the expiration time of the data item, or reload the data update into the cache through the eviction policy. Content caching most web pages generated from templates have headers, footers, toolbars, menus, and so on. These pages actually change infrequently and should not be generated dynamically. Compared to using back-end data stores, using in-memory caching, such as Azure Redis caching, allows Web servers to quickly access such static content. This mode reduces the processing time and server load required to generate content dynamically. This improves the responsiveness of the Web server and reduces the number of servers needed to handle the load. Azure Redis caching provides a Redis output cache provider that supports this mode for ASP.NET. User session caching

This mode is commonly used for shopping carts and other user history types of information. Web applications may need to associate such information with the user Cookie. Storing too much content in Cookie can have a negative impact on performance because the Cookie gets larger and the Cookie needs to be passed and validated every time a request is made. The common solution is to use Cookie as the key to query the data in the back-end database. Using an in-memory cache (such as an Azure Redis cache) to associate information with a user is much faster than interacting with an entire relational database

Jobs and message queuing when an application receives a request, it usually takes extra time to perform the operations associated with the request. Long-running operations are usually added to the queue for later processing (which may be handled by other servers). This method of deferring work is called a task queue. A variety of software components are designed to provide task queue support. Azure Redis caching also provides this support as a distributed queue. Distributed transactions typically require applications to be able to execute a series of commands on the back-end data store in the form of a single operation (atomic operation). All commands must be successful, otherwise all commands must fall back to their initial state. Azure Redis caching supports the execution of a batch of commands as a transaction through a single operation.

If you meet these scenarios, you can try to use Redis on Redis,Azure at different levels, just like other services.

The layer describes the basic single-node cache. This layer supports multiple memory sizes (250 MB-53 GB). This layer is suitable for development / testing and non-critical workloads. The basic layer does not provide replicated caching in the service-level agreement (SLA) standard dual-node (primary / secondary) configuration and provides high availability SLA (99.9%) Advanced tier is an enterprise-oriented tier. Advanced layer caching supports more features, higher throughput, and lower latency. Caching in the advanced tier is deployed on more powerful hardware and performs better than the basic or standard tier. This advantage means that the throughput of the advanced tier is greater than that of the standard tier when the cache size is the same.

The functions of different layers will also be very different. To put it simply, you can use a picture to directly see the functions supported by different layers.

On the whole

The basic cache is a single cache node for development / testing and non-critical workloads. There is no service level agreement at the base level. During the update and upgrade phase of the cache node, the service is not available and data may be lost.

The standard cache provides a replicated cache in the dual-node primary / secondary configuration. Microsoft manages automatic replication between the two nodes and provides a highly available service-level agreement.

In addition to more powerful performance, advanced caching also provides many features that are not supported by standards and basic levels, such as VNET integration, Redis cluster mode, sharding, etc.

Of course, in addition to functions, each level has different performance indicators, and the maximum number of client connections allowed is also different.

such as

Basic standard

Advanced

Memory size

250 MB-53 GB250 MB-53 GB6 GB-530 GB* network performance low-high-high-high school-maximum number of client connections

20000

2000040000

Of course, each level will also have different registrations. For example, the standard level will be subdivided into seven levels of C0-C6. The price and performance of each level are different. For more information, please refer to the following URL

Https://www.azure.cn/zh-cn/pricing/details/cache/

For production environments, at least the standard version should be used

This is a brief introduction to Redis. Next, let's take a look at some configurations in the process of creating Redis and how to verify that Redis is working properly.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report