The combination of Redis and MySQL

Source: Internet
Author: User
Tags redis cluster
The combination of Redis and MySQL

At present, most Internet companies use MySQL as the main persistent storage of data, so how to make Redis and MySQL well together? We mainly use a MySQL as the main library, Redis as a high-speed data query from the library of heterogeneous read-write separation scheme.

For this purpose, we have developed our own MySQL replication tool, which makes it easy to synchronize data from MySQL to Redis in real time.

(Mysql-redis heterogeneous read-write separation)

Summarize:

  1. The Redis replication feature does not have incremental replication, and each time the re-connection sends the entire memory snapshot of the main library to the slave library, you need to avoid adding from the library to the more stressful main libraries on the online service.
  2. Redis replication is using snapshot persistence, so if your redis persistence option is log append (AOF), then it is possible for the system to do both the AOF log file and the snapshot write disk operation at the same time. The responsiveness of Redis will be affected at this time. So if you choose aof Persistence, you need to be more cautious about adding from the library.
  3. Redis cluster construction and online expansion can be done using active replication and presharding methods.

The combination of Redis and MySQL

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.