Redis master-slave replication principle

Source: Internet
Author: User

I do not like too much text (too faint), directly

First synchronization process (full sync):

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/B7/wKioL1WmTEiiBXrGAAFzSHHtTOA173.jpg "title=" 2a5d24eb-042c-44f0-911d-152ff179ca3c.png "alt=" Wkiol1wmteiibxrgaafzshhttoa173.jpg "/>


Synchronization during the run (partial resynchronization), no partial resynchronization prior to version 2.8:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/B7/wKioL1WmTNCRKq9GAAHSL9fze8s533.jpg "style=" float: none; "title=" 2.png "alt=" Wkiol1wmtncrkq9gaahsl9fze8s533.jpg "/>



During Redis operation, partial resynchronization is interrupted, the whole process is as follows, introducing Runid, offset:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/B7/wKioL1WmTNGgM1uEAALnl4fIid4250.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1wmtnggm1ueaalnl4fiid4250.jpg "/>


The default size of the replication backlog buffer is 1M, which can be customized as required. Algorithm: Second * write_size_per_second,

Second: Average time of master/slave disconnection;

Write_size_per_second: Refers to the command data generated by the master-slave average per second.

Runid: Consists of 40 random 16-based characters

Redis Master-slave replication principle

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.