1. What is Redis
Redis is a high-performance key-value database developed in C language.
Main features:
- There is no necessary relationship between data
- Internally use a single-threaded mechanism to work (the operation is more atomic)
- high performance
- Multiple data type support
- Persistent support for data disaster recovery
Redis application:
为热点数据加速查询,如热点商品、资讯等高访问量信息
任务队列,如秒杀、购票排队等
即时信息查询,如排行榜、网站访问统计、在线人数等
时效性信息控制,如验证码
分布式数据分享,如session分离
其他
Second, Redis installation and startup
Windows version, suitable for learning.
Official website download address: http://redis.io/download
github download address: https://github.com/MSOpenTech/redis/tags
The installation package downloaded from the windows version can be used after decompression, which is very convenient.
Find the server and client executable files under the decompression path, as follows:
start redis
Double-click redis-server.exe to start the redis service.
Access redis
Double-click redis-cli.exe to access redis service.
Enter ping and the server will return pong, indicating successful startup.