The master and slave servers use redis (which is not stored in the mysql database for the time being). how can we ensure real-time data consistency of each machine?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.