Redis Source Learning (copy Replication)

Source: Internet
Author: User

The Redis replication (Replication) feature is the implementation of master-slave databases.

If you want to improve the efficiency of the request, you can use the primary database for write operations, from the database for read operations. And you can use one master, multiple from.

Redis is a single-threaded program, and all events (file events and time events) are done in one thread. There are no read/write locks that can release the execution efficiency of the program. From another point of view, a single thread can run only in one CPU, without the processing power of a multicore CPU, using a master-slave database to solve processing power problems, and Redis uses I/O multiplexing technology to handle high concurrent requests.


Operation For example, the primary database IP is 10.1.1.8 port is 6327 from the database operation: ./redis-cli use command: slaveof 10.1.1.8 6327 This is set up so that you can look at the logs from the database. principle First synchronization: Synchronizing the primary database with file (DUMP.DBF) synchronization and loading files from the database Continuous synchronization: The operation of command synchronization mode, such as the main database operation of the write Operation T1,t2, T3; Write command t1,t2, T3 distributed to all the slave database, and execute these commands.
 


Redis Source Learning (copy Replication)

Related Article

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.