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)