Redis Introduction
1. Redis is an open source, in the form of key-value storage
2. The data structure is generally referred to as the server, its value can be a string (String), Hash (the Hash), a list (List), set (sets), and an ordered collection (sorted sets) and other types of
3. The data is cached in memory, to be periodically updated or additional recording data to disk file
Redis is one Nosql, then with traditional relational database is not the same as where to?
1. MySQL small volume, high speed, low cost, stable structure, easy to check, you can ensure data consistency, but the lack of flexibility
2. NoSQL high performance, scalability, availability, not limited to a fixed structure, reduces the overhead in time and space, but is difficult to guarantee data consistency
Redis features
1. processing large amounts of data over
2. runs on inexpensive PC server clusters
3. shattering performance bottlenecks
Common application scenarios
1. High concurrent read and write data
2. High efficiency and access to massive data storage
High scalability and high availability for data 3
Note: Here explain third point, highly scalable because it is difficult to upgrade the structure of relational database tables, and redis is a key-value store, so high scalability
Redis business scenario
1. Take the latest operation data of the N
2. Application of charts, the operation takes top N
3. The need to precisely set the expiration time of application
4. Application of the counter
5. pup / sub messaging system build real-time (subscription)
6. Construction queuing system
7. Use cache
Reids installation tutorial
https://www.runoob.com/redis/redis-install.html