We all know that redis has the redis-cli subscription and publishing function. Similarly, if the data on the master server is modified, how can we notify each slave server to change data in real time (within milliseconds? For example, for example, for 12306 of the votes, Shanghai servers in Guangzhou in Beijing must record and display the master server in real time... we all know that redis has the redis-cli subscription and publishing function. Similarly, if the data on the master server is modified, how can we notify each slave server to change data in real time (within milliseconds? For example, if the ticket is to be snatched for 12306, the Shanghai server in Guangzhou in Beijing must record the remaining ticket quantity on the master server in real time. Once the ticket purchase is completed, how can I get a notification to change the status of each server in real time? I hope you can give me some advice.
Reply content:
We all know that redis has the redis-cli subscription and publishing function. Similarly, if the data on the master server is modified, how can we notify each slave server to change data in real time (within milliseconds? For example, if the ticket is to be snatched for 12306, the Shanghai server in Guangzhou in Beijing must record the remaining ticket quantity on the master server in real time. Once the ticket purchase is completed, how can I get a notification to change the status of each server in real time? I hope you can give me some advice.
Now that you have configured the master and slave nodes, the slave server automatically synchronizes the data modified by the master server.