In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 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.
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.