Redis 1-Redis简介
简介
- 官方简介
- Redis is an open source (BSD licensed)
- 开源, 协议是 BSD
- in-memory data structure store
- 内存存储
- used as a database, cache and message broker
- 可用于数据库、缓存、消息队列
- 谁再用Redis
https://techstacks.io/tech/redis
5种基本数据结构
- String 字符串
- List 列表
- Hash 哈希
- Set 集合
- Sorted Set 有序集合
高级数据结构
- bitmap 位图
- HyperLogLog 超日志
- stream 流
高级应用
- 布隆过滤器
- 简单限流
- 漏斗限流
- GeoHash
- PV/UV统计
- 签到
- 延迟队列
- 分布式锁
相关程序
- Pipelining 管道
- Redis Pub/Sub 发布订阅
- Redis Lua scripting 支持Lua脚本
- Expires 过期处理
- Redis as an LRU cache 基于LRU的缓存策略
- Redis transactions 事务支持
- Partitioning 分区
- Distributed locks 分布式锁
集群支持
- Cluster 集群
- Sentinel 哨兵
- Codis 第三方
源码说明
- 构建Redis
- 支持构建 64 位及 32 位的
- 32 位会更省内存
- 源码结构
- src
- Redis 代码实现
- 用 C 语言来写的
- tests
- 单元测试
- deps
- 第三方包依赖
- 包含 jemalloc
|_ src/ # contains the Redis implementation, written in C.
|_ tests/ # contains the unit tests, implemented in Tcl.
|_ deps/ # contains libraries Redis uses.
Redis版本变化
- Redis2.6
- 2012年正式发布
- Redis2.8
- 2013年11月
- Redis Sentinel 生产可用
- Redis3.0
- 2015年4月
- Redis3.2
- 集群高可用
- Redis4.0
- 2017年7月
- 新增混合持久化和 LFU 淘汰策略
- Redis5.0
- 2018年10月
- Stream
- Redis6.0
- 2020年5月
- 多线程 I/O