Redis acquaintance
What is Redis
- Open source
- Key-Value storage service system based on
- Multiple data structures (string, hash, list, set, sorted set)
- High-performance, feature-rich
Review the characteristics of Redis
- Fast 10w OPS
- Data stored in the memory
- C language (50000line)
- Single-threaded threading model
- Persistence (do not throw off data)
- A variety of data structures
- BitMaps Bitmap
- HyperLogLog ultra-small memory count unique values
- GEO locate address information
- Support for multiple programming languages
- java
- php
- python
- ruby
- take
- nodejs
- Feature-rich
- Publish and subscribe
- Lua script
- Simple transaction
- Concurrent improve pipeline efficiency
- simple
- Dependent on external libraries
- Single-threaded model
- Master-slave replication
- Primary server
- From the server
- From the server
- From the server
- Primary server
- High-availability, distributed
- redis-sentinel support high availability
- redis-cluster support distributed
Redis typical usage scenarios
- Caching System
- app server --> cache --> Storage
- Single-threaded counter
- Microblogging forwarding number
- Reviews
- Message queuing system
- Leaderboard
- Ordered set
- Social network
- Number of fans
- Number of concern
- Real-Time Systems
- Spam filtering