Redis Advanced Utility features (1)

Source: Internet
Author: User
Tags strong password redis server

1. Security

2. master-slave replication

3. Transaction processing

4. Persistence mechanism

5. Publish a subscription message

6. Use of virtual memory

Security: Set the password to be used before any other specified client connection is made

Warning: Because Redis is very fast, under a better server, a

External users can make a 150K password attempt in a second, which means you need to specify

Very very strong password to prevent brute force hack.

Modify the # requirepass foobared option in the configuration file

Remove the comment, followed by the password

Password is set, you can authorize auth password when logging in

You can also authorize redis-cli-a password when you log in

Master-slave replication: Redis master-slave replication and use are very simple. With master-slave replication, you can allow

Multiple slave servers have the same database copy as master server

>> features of Master-slave replication:

1.master can have multiple slave

2. Multiple slave can connect to the same master, and can also connect to other slave (alternate master, which becomes master immediately when Master is not available)

3. Master-slave replication does not block primary, while synchronizing data, Master can continue to process client requests

4. Improve the scalability of the system

>> master-slave copy process:

1.slave Connect with master, send sync Sync command

2.master receiving a command initiates a background process that saves the database snapshot to a file while the master master process

will start collecting new write commands and caching.

3. After the background has finished saving, send this file to slave

4.slave Save this file to your hard disk

>> Configuring the Master and Slave servers:

Configuring the Slave service is simple, just add the following configuration to the slave configuration file

Slaveof 192.168.1.1 6379 #配置master的ip和ip端口

Masterauth Password #这是主机的密码

View current Redis server status, Info command, can see the current role and other information, to determine the roles that the server plays (master or slave)

Redis Advanced Utility features (1)

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.