About Redis study notes (a) --- of Redis

Foreword

Introduction of Redis:
1.Redis is completely open source free of charge, to comply with the BSD license . It is a high performance ( the NOSQL ) of the key-value database.

2.Redis is an open source use ANSI C language prepared to support the network, based on the persistence of memory can log type, Key-value database .

Added: 1) What is the BSD license?
BSD is "Berkeley Software Distribution" acronym, meaning "Berkeley Software Distribution." This open source licenses give users a lot of freedom .
2) NOSQL: represents the non-relational database , it is to solve large-scale data collection of multiple data types of challenges, especially in big data application problems.
3) NOSQL database divided into four categories:
[1] key (Key-Value) stored database : this type of databases will be used primarily to a hash table. Such as: Redis, the Oracle BDB
[2] column-store database : This is part of the database is usually used to deal with massive data distributed storage, key still exists, but they are characterized by pointing to multiple columns. These columns are to the family to arrange. Such as: Cassandra, HBase, Riak
[3] document type database : it can be seen as an upgraded version of the key database, allowing nested between keys, and database queries more efficient than the key database file, but the only a little less than that it is not so much the key database data types. Such as: MongoDB
[4] Graphics (Graph) database : it uses a flexible graphical models, such as: Neo4J
4) Redis key-value cache with other product has the following three characteristics:
[1] persistence Redis support data, data in memory can be saved to disk, reboot to load when you can be reused.
[2] Redis only support simple key-value data types, while also providing list, set, zset, hash storage, the data structure
[3] Redis support data backup , high availability cluster like function .
5) NOSQL (non-relational databases) and SQL (relational database) difference:
there is no relationship between the data and the data: NOSQL
SQL: establish relationships between tables and tables

3.NOSQL database applicable scenarios:
[1] data model simple
[2] requires more flexibility of the IT system
[3] high performance requirements of the database
[4] does not require highly consistent data
[5] For a given key, relatively easy to map complex environmental values

4.Redis advantages and disadvantages:
Advantages:
[1] a rich data structures
[2] High-speed reading and writing, using a splitter Redis own implementation of the code amount is very short, without the use of lock (eg: MySql), and therefore a very high efficiency
disadvantages :
[1] persistence: Redis data will be stored directly into memory, save data to disk. Redis can be used in two ways persistence of the process, time snapshots (snapshot): Each period of time the entire database to disk drive, each time to write all of the data, the cost is very high. The second approach based on the statement added (aof): only tracking data changes, but additional log may be too large, and all operations are re-run it again, reply to slow
[2] memory consumption, high memory footprint.

5.Redis summary:
[1] redis key may be stored in a single size 512M
[2] redis supports multiple types of data structures (string, list, hash set, zset.)
[3] redis is single-threaded, the operation is atoms of
[4] redis can persist due to the use RDB and AOF mechanisms
[5] redis clustered, and redis support library (0 to 15) 16 library
[6] redis can do the message queue, such as chat rooms
Tips : set in the enterprise development, can be used as a database cache (hot data - often questioned, but not frequently modified or deleted data), and most of the middleware functions.

Published 19 original articles · won praise 2 · Views 398

Guess you like

Origin blog.csdn.net/TheWindOfSon/article/details/104089568