Introduction to the Redis database

Source: Internet
Author: User
Tags memcached

Redis is a key-value storage system, similar to memcached, which supports storing more value types, including string (string), list (linked list), set (set), Zset (ordered collection), GEO (coordinate), and hash ( Hash type). These operations support Push/pop, Add/remove, and intersection-set and difference-set operations, and these operations are atomic in nature. Redis also supports different ways of Pei, like memcached, in order to ensure efficiency, the data is cached in memory, the difference: Redis periodically writes the updated data to disk or writes the modified operation to the appended record file, and implements Master-slave (Master-slave) synchronization.

Redis Master-Slave synchronization: Data can be synchronized from the primary server to any number of slave servers, and the server can be associated with other primary servers from the server. By fully implementing the subscription publishing mechanism, you can subscribe to a channel and accept a complete message release record from the master server when you synchronize the tree from anywhere in the database.

SQL database performance is not high because of the existence of transactions. In the case of large data volume access, the SQL database has its drawbacks.

Note:

Subscription Release mode:

The subscription publishing pattern defines a one-to-many dependency that allows multiple subscriber objects to listen to a Subject object at the same time. When the subject object changes its state, all the subscriber objects are notified so that they can automatically update their state.

One of the bad side effects of splitting a system into a series of collaborative classes is the need to maintain consistency between objects, which can be inconvenient for maintenance, expansion, and reuse. The subscription release pattern is used when an object's change requires changing other objects at the same time, and it does not know how many objects need to be changed.

An abstract model has two facets, one on the other, in which the subscription release pattern can encapsulate the two in separate objects, changing and reusing them independently. The job of subscribing to the publishing model is actually decoupling. Let both sides of the coupling rely on abstraction, rather than relying on specifics, so that their changes will not affect the other side of the change

Introduction to the Redis database

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.