In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about why you use redis to cache. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
、
First of all, let's introduce some basic concepts of redis. Redis is a Nosql database and a key-value storage system. Although redis is key-value 's storage system, redis supports many value storage types, such as strings, linked lists, collections, ordered collections, and hashes.
So why use a Nosql database like redis?
1) when the total amount of data is too small for a machine to hold
2) when there is no room in a machine for data indexing
3) the number of visits (mixed read and write) when an instance cannot be put down.
In the stand-alone era, storage uses only one machine to install mysql. If thousands of pieces of data are stored at a time, the performance of mysql is very poor, storage and read speed is very slow, and then evolves into cache + mysql+ vertical split.
Cache as an intermediate cache era, all the data is saved in the cache first, and then stored in mysql to reduce the pressure on the database and improve efficiency.
However, when the data increases to another order of magnitude again, the above method can not meet the demand. Due to the increase of the write pressure on the database, caching can only alleviate the read pressure on the database. The concentration of read and write on a database makes the database unbearable. Most websites begin to use master-slave replication technology to achieve read-write separation, so as to improve read-write performance and read-library scalability. Mysql's master-slave mode has become standard for websites at this time.
In the era of master-slave separation mode, on the basis of redis cache, master-slave replication and read-write separation of MySQL, the write pressure of MySQL master library begins to appear bottleneck, and the amount of data continues to soar. Due to the use of table locks in MyISAM, there will be serious lock problems in high concurrency. A large number of highly concurrent MySQL applications begin to use InnoDB engine instead of MyISAM.
Advantages of Nosql database
1) easy to expand
These types of data stores do not require fixed schemas and can be scaled horizontally without redundant operations. A particularly large number of tables and fields can be reduced compared to relational databases. It also brings scalable capabilities at the architectural level.
2) large amount of data to improve performance
3) various and flexible data models
Thank you for reading! On why to use redis to cache to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
Select to_date ('2005-12-25 Person13-25-5-5-5-5) from dual
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.