Redis master-Slave Configuration Guide for Windows Server clusters

Source: Internet
Author: User
Tags install redis

The previous time an item was due to a large amount of concurrency. Due to prevent downtime to do a master-slave backup, the first page of the table connection query is very time-consuming. So take out the tool Redis caches this query result and updates as the user operates.

Because the official currently only Linux version, Windows edition download: https://github.com/ServiceStack/redis-windows/tree/master/downloads

Unzip into redis directory after download is complete

setting up a Redis master server

1. Install the primary server cache: Master Redis

Create a new BAT file: Redis-server--service-install redis.windows.conf--loglevel verbose--service-name redis double-click Execute

2. Set as service and start on the primary server

New batch: Redis-server--service-start--service-name redis redis.window.conf double click to execute

Open the service interface, for example, the Redis service will start automatically the next time Windows is powered on

3. Due to the service is no interface, and is not easy to demonstrate. So we manually start the Redis with the interface

Double-click Redis-server.exe, and note that the screen cannot be closed. Then open Redis-cli.exe. The screen displays 127.0.0.1:6379, which means that Redis has started normally

Try to write a value to it, and then read

setting up a redis slave server

1. Copy the Redis folder to the slave server and install

new Batch redis-server--service-install redis.windows.conf--loglevel verbose--service-name slave1        

        2. Setting auto-start

        batch processing   redis-server-- Service-start--service-name slave1 redis.window.conf      

3. Open the redis.window.conf configuration file from the server

A) 6780 port 6780 for modified ports

b) Set the slave server to the primary server

Bind 127.0.0.1 from server IP
Slaveof 192.168.0.102 6379 Primary server IP and port

Start Testing master-slave Redis

1. For demonstration convenience, manually start Redis from the server

Redis-server.exe redis.windows.conf (start with redis.windows.conf as profile),


         < Span style= "color: #000000;" The main Server cmd window displays the following information    

Testing data from the server

1. Connect locally: Redis-cli.exe-h 127.0.0.1-p 6380,

Get

To this end of the Redis master-slave Setup, the next section: How IIS does the load Balancing cluster management

Redis master-Slave Configuration Guide for Windows Server clusters

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.