In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to achieve Redis cluster mechanism and Redis architecture evolution". In daily operation, I believe many people have doubts about how to achieve Redis cluster mechanism and Redis architecture evolution. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to achieve Redis cluster mechanism and Redis architecture evolution". Next, please follow the editor to study!
Replication (master-slave replication)
Redis's replication mechanism allows slave to transfer copies from master to a complete data backup over the network, thus achieving the master-slave mechanism. In order to implement master-slave replication, we prepare three redis services, named master,slave1,slave2 in turn.
Configure the primary server
In order to test the effect, we first modify the port information of the configuration file redis.conf of the main server
1. Port 6300 configuration slave server
The configuration related to replication is relatively simple, just add the following line to the configuration file of slave. You just need to change the ip address and port number.
1. Slaveof 192.168.1.1 6379
Let's first modify the port information and slave server configuration of redis.conf from the configuration file of server 1.
1. Port 63012. Slaveof 127.0.0.1 6300
We then modify the port information and slave server configuration of redis.conf from the configuration file of server 2.
1. Port 63022. Slaveof 127.0.0.1 6300
It is worth noting that, starting with the redis2.6 version, slave supports read-only mode and is the default. You can configure it through the configuration item slave-read-only.
In addition, if master sets the password through the requirepass configuration item, slave needs to verify the password for each synchronization operation, and you can add the following configuration item to the slave configuration file
1. Masterauth at this point, the study on "how to achieve the evolution of Redis cluster mechanism and Redis architecture" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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: 253
*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.