Redis Learning Notes

Source: Internet
Author: User

Previously, have been taking redis when memcached to use, today only really learned that Redis really stronger than memcached where, his real strength to where.

The first thing that confuses me most is, is redis all the data stored in memory? This puzzles me, and if so, where does the keys have memory, which improves performance. I was confused, after looking at the RDB, aof, and found that it is not like the data store query database file. Later I decided to re-learn the Redis-related information, the following summary:

where are the data stored in Redis?

Redis's key is absolutely stored in memory, which is the Redis high-performance of a relying on, where is the value of where to save? The default is the existence of virtual memery inside, so-called fictitious memory, it should be noted that the virtual memory here is not the virtual memory of the system, but a data storage file in Redis, which makes me depressed for a long while. Because Redis can set the Vm.swap file storage directory.

usage Analysis of Redis's memory

Why Redis calls a database file called virtual memory, not a database file, this great article, the so-called Redis design concept data is stored in memory design, because even if virtual memory is set, Redis will automatically put hot data in memory, directly provide read, Increase performance by putting frequently-unread data into virtual memory. And the keys have been recorded in the virtual memory file of the addressing data, reading is also much faster than the general database.

Redis's Cluster

Http://www.redis.cn/topics/cluster-tutorial.html

Redis Shard, Redis high availability, Redis master-slave backup, can refer to the above, Redis-trip tool implementation Redis-cluster real cluster.

A Redis shard is a hash algorithm that distinguishes a key from several intervals, and then is partitioned by a library or server. Very smart with Redis-trip tools.

The storage structure of Redis

Redis supports map, list, string, int and other data types, in order to reduce the number of keys, reduce the use of memory, reasonable use of map, list can reduce memory and clear program logic.

the reliability of Redis

Redis officially claims that Redis is not a data storage engine with absolute data security, and when it is stored, Redis is stored in memory and returned to the state, where it is not written to disk, which is likely to be lost, but only because of this, the performance of Redis is greatly improved, Reduces the write frequency of the disk.

Redis Application Scenarios

Redis can fully do data cache database, always count, always statistics

Redis Learning Notes

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.