(a) initial knowledge of the Redis memory database

Source: Internet
Author: User

What is a Redis memory database?

Redis, essentially a key-value type of memory database, the entire database is loaded in memory to operate, periodically through asynchronous operations to flush the database data to the hard disk to save. So it's a pure memory operation, and Redis performs well and can handle more than 100,000 reads and writes per second. Although it is an in-memory database, its data can be persisted and rich data types are supported.

Redis supports the data structure of the list and set collections, and also supports various operations on the list, such as push and pop data from the list, the list interval, sorting, and so on. The set supports the assembly intersection operation of various sets, and the maximum limit for a single value is 1GB.

The main disadvantage of Redis is that it is limited by physical memory and cannot be used as a high-performance read-write for massive data, and it has no native extensible mechanism, and does not have the ability to expand, relying on clients to realize distributed read and write. Therefore, the suitable application scenario is mainly confined to the high performance operation and operation of the small data volume.

Best practices: Applications where data changes quickly and database size can be met (memory size).

For example: Stock software, data analysis, real-time data collection, real-time communication.

Redis belongs to the NoSQL category, meaning: Not only SQL, is not just SQL, is a new technology, along with Web 2. 0 of the arrival of a wide range of applications. The idea is to use non-relational data storage.

A database of key-value types primarily uses a hash table, which has a specific key and a pointer to specific data. The advantages of the Key/value model for IT systems are simple and easy to deploy. The main feature is the extremely high concurrent read and write performance.


What is persistence?

All redis data is stored in memory and then periodically asynchronously saved to disk (this is known as semi-persistent), or every data change can be written to disk (this is called full persistence). Persistence is the transformation of the memory data into hard disk data, the memory model to the storage model, or the transition between the instantaneous state and the persistent state.

Redis has two types of persistence, the default being the snapshot method, which is implemented by periodically persisting snapshots of memory to the hard disk, a disadvantage of which is that if crash occurs after persistence, a piece of data is lost. Another is the AoF method, which saves the operation commands to the log file while writing the memory data.

This article is from the "Little Demon's Home" blog, so be sure to keep this source http://littledevil.blog.51cto.com/9445436/1790864

(a) initial knowledge of the Redis memory 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.