In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to expand the capacity of redis, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Capacity expansion:
1. Clustering, using agents, to achieve the purpose of clustering.
two。 Master-slave synchronization, read-write separation.
Advantages:
1 excellent read and write performance, fast reading and writing speed of IO from memory.
2 supports data persistence and supports both AOF and RDB persistence methods (since Redis data is stored in memory, if persistence is not configured, all data will be lost after redis restart, so you need to enable redis persistence feature to save data to disk. When redis restarts, you can recover data from disk. Redis provides two ways for persistence. One is RDB persistence: the snapshot of the dataset in memory is written to disk within a specified time interval. The actual operation is a child process of fork, which first writes the dataset to a temporary file, and then replaces the previous file and stores it with binary compression. Another kind is AOF persistence: every write and delete operation processed by the server is recorded in the form of log, the query operation is not recorded, it is recorded in the way of text, and the file can be opened to see the detailed operation record. )
(3) Master-slave replication is supported, and the host will automatically synchronize the data to the slave computer, and read and write can be separated.
(4) the data structure is rich: in addition to supporting value of string type, it also supports string, hash, set, sortedset, list and other data structures.
5 Redis is single-threaded and multi-CPU, which is faster. Because of single thread, there is no overhead of thread switching, and there is no need to consider locking and releasing locks, so there is no deadlock problem. Single thread-multiplexing IO model. High efficiency.
Disadvantages:
1 Master-slave synchronization. If the host is down, some data is not synchronized to the slave before the outage, which will lead to data inconsistency.
two。 Master-slave synchronization, data synchronization will be delayed.
3. Due to the separation of reads and writes, the host writes too much, which will also lead to the downtime of the host.
The above are all the contents of the expansion method of redis. Thank you for your reading. I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.