Redis Master-slave replication

Source: Internet
Author: User

1. Create 2 directories on a Windows disk, for example: Masterredis (the master service is stored) Slaveredis (slave service is stored)

2. Configuration file (redis.conf) modification in Master service: Bind 127.0.0.1 (IP address of master)

3. configuration file modification in slave service: Port 6381 (service port to separate) bind 127.0.0.1 (IP address from server) slaveof 127.0.0.1 6379 (this is host and Port of master)

4. Start up the master and slave servers

5. In order to reduce the size of the AoF file at a time, Reids2.4 added the Bgrewriteaof function later, Redis will choose a self-perceived low load situation to execute bgrewriteaof, this rewrite aof file process is very impact performance,

Solution: Master Turn off the Save function, turn off the aof log function, in order to achieve the best performance, slave turn on save and turn on the AOF log function, and turn on the BGWRITEAOF function, do not provide services externally, so slave load is generally higher than the master load, But master performance achieves the best

Redis Master-slave 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.