In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Huawei cloud distributed cache Redis can cope with many typical scenarios, such as many large e-commerce websites, live video streaming and game applications. It has large-scale data access, high data query efficiency, simple data structure and does not involve too many related queries.
This scenario uses Redis, which has a great advantage over the traditional disk database in speed. It can effectively reduce the database disk IO, improve the efficiency of data query, reduce the workload of management and maintenance, and reduce the cost of database storage.
Redis is an important supplement to the traditional disk database and has become one of the indispensable basic services for Internet applications, especially for Internet applications that support high concurrent access.
Here are a few typical examples:
(e-commerce website) rush to buy
The commodity categories, recommendation system and flash buying activities of e-commerce websites are suitable to use Redis cache database.
For example, the second kill rush purchase activity, which is high at the same time, has great access pressure for the traditional relational database, and needs higher hardware configuration (such as disk IO) to support. Redis database, single node QPS support can reach 100000, easy to deal with second kill concurrency. The commands to achieve second kill and data shackles are simple, just use SET, GET, DEL, RPUSH and other commands.
In the locking section, you can refer to best practices: using DCS to implement distributed locks
(live video broadcast) message on-screen comment
The online user list, gift ranking, on-screen comments and other information of the live room are all suitable to be stored using the SortedSet structure in Redis.
For example, on-screen comment messages can be returned using ZREVRANGEBYSCORE sorting. In Redis5.0, the zpopmax,zpopmin command has been added to facilitate message processing.
(game application) game ranking
Online games generally involve ranking real-time presentations, such as listing the 10 users with the highest scores. It is very appropriate to store user rankings using Redis's ordered collections, which are very easy to use, providing up to 20 commands for manipulating collections.
You can refer to the best practice: using DCS to achieve ranking function
(social APP) return the latest comments / responses
In web applications, there are often queries such as "latest comments". If you use a relational database, it is often related to reverse sorting by comment time. As there are more and more comments, the sorting efficiency becomes lower and lower, and the concurrency is frequent.
Using Redis's List (linked list), for example, storing the latest 1000 comments, when the number of requested comments is in this range, there is no need to access the disk database and return directly from the cache, reducing the pressure on the database while improving the response speed of APP.
Using Huawei Cloud distributed cache Redis in these scenarios can achieve high efficiency and low cost, and the problem can be easily solved.
This article is from Huawei Cloud help Center.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.