write picture description here

Redis configures master-slave replication to achieve read-write separation Develop Paper

class=”markdown_views prism-dracula”> Foreword: Due to the high performance of redis, the application relies heavily on it. Sometimes the performance of a redis server is not enough, and a redis cluster needs to be configured. The simplest is one for reading and one for writing. Generally, the demand for reading is relatively large, so you can configure one master (read) and multiple slaves (write). This time, we set up two virtual machines locally as a master and a slave respectively. ip is 192.168.2.100 as the master server ip is 192.168.2.101 as the slave server 1. Install redis First install redis on the two servers separately. Please refer to https://blog.csdn.net/u014691098/article/details/80892504 2. Configure the main server 1. Enter the 192.168.2.100 server and open the redis configuration file [root@localhost redis-4.0.10]# vim /etc/redis/6379.conf 2. Comment out the line bind 127.0.0.1 or specify the ip. (This example is a comment, that is, all ip can be connected) 3. Start the daemon process 4. Set the access password (because the performance of redis is very high , the risk of crashing is extremely high, it is recommended to set the password online is very complicated, it is best to specify the ip in step 2) Note: Of…

write picture description here

Redis configures master-slave replication to achieve read-write separation Develop Paper

class=”markdown_views prism-dracula”> Foreword: Due to the high performance of redis, the application relies heavily on it. Sometimes the performance of a redis server is not enough, and a redis cluster needs to be configured. The simplest is one for reading and one for writing. Generally, the demand for reading is relatively large, so you can configure one master (read) and multiple slaves (write). This time, we set up two virtual machines locally as a master and a slave respectively. ip is 192.168.2.100 as the master server ip is 192.168.2.101 as the slave server 1. Install redis First install redis on the two servers separately. Please refer to https://blog.csdn.net/u014691098/article/details/80892504 2. Configure the main server 1. Enter the 192.168.2.100 server and open the redis configuration file [root@localhost redis-4.0.10]# vim /etc/redis/6379.conf 2. Comment out the line bind 127.0.0.1 or specify the ip. (This example is a comment, that is, all ip can be connected) 3. Start the daemon process 4. Set the access password (because the performance of redis is very high , the risk of crashing is extremely high, it is recommended to set the password online is very complicated, it is best to specify the ip in step 2) Note: Of…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索