In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Redis includes master and slave nodes: the master node provides read and write services, and the slave node, as the data backup of the master, synchronizes all the data from the master node. Under the master-slave replication architecture, the default Slave is read-only, and an error will be reported if you write, but you can change it to writable by setting the slave-read-only parameter to no.
Master-slave replication is triggered actively by slave, and the process is as follows:
1. First, slave initiates the sync command to master. After initiating, master passively adds the new slave nodes to its own primary and standby replication cluster.
After 2.master receives the sync, start the bgsave operation.
After the 3.bgsave is completed, master sends the snapshot information to slave.
4. During the transmission, the new write commands received by master from the user's customer order are stored in the backlog queue except for the normal response.
5. After the snapshot information is sent, master continues to send backlog queue information.
After the 6.backlog is sent, subsequent writes are sent to slave at the same time to maintain real-time asynchronous replication.
The processing logic on the slave side is as follows:
After sending the sync, slave continues to provide services to the outside world.
Begin to receive snapshot information from master, at the same time, empty the existing data of slave and write the master snapshot to its own memory.
The backlog content is received and executed, during which a read request is provided to the outside.
Continue to receive subsequent copies of commands from master and continue playback to keep the data consistent with master.
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.