Redis advanced features 1

Source: Internet
Author: User

I. Security username and password)

Find requirepass in redis-conf and change it to requirepass *****.

There are two methods to use the password

1. Go to redis-cli and then auth ******

2. redis-cli-******

Ii. Master-slave Replication

1. The Master can have multiple Slave instances.

2. slave can be connected to the same master or slave.

3. master-slave replication does not block the master node. During data synchronization, the master node can continue to process requests.

4. Improve system scalability

Configure the redis-conf of slave and find the location:

650) this. width = 650; "title =" QQ20130921220701.png "src =" http://www.bkjia.com/uploads/allimg/131229/210453L62-0.png "alt =" 221520314.png"/>

To:

Slaveof192.168.88896379

Masterauth ******

Iii. Transaction Processing

Redis supports Simple transactions. After the multi command is started, the connection enters the transaction. Subsequent commands after the connection are not executed immediately, but are placed in the queue first. When the exec command is executed, redis executes commands in the queue sequentially.

The discard command clears the queue and rolls back the transaction.

However, it is worth noting that when an error occurs later, the executed command will not be rolled back.

For example:

650) this. width = 650; "title =" QQ20130921220701.png "alt =" 220742565.png" src = "http://www.bkjia.com/uploads/allimg/131229/210453C32-1.png"/>


This article is from the "phper" blog, please be sure to keep this source http://janephp.blog.51cto.com/4439680/1299853

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.