The first RC release of Redis 7.0 has been out for a while. The new version contains several new user-facing features, significant performance optimizations, and many other improvements. At the same time, changes that may break compatibility have been introduced, so users need to confirm whether they are affected when upgrading.

The following changes require special attention:

Redis 7 store AOF as multiple files in one folder
Redis 7 applies a new (version 10) format for RDB files, which is not compatible with older versions
Redis 7 dynamically converts ziplist encoded keys to listpacks when loading older RDB formats. This process usually happens between loading files from RDB or between master-slave replication and increases load time

new features

Redis Functions: New way to extend Redis with server scripts (#8693)
see https://redis.io/topics/functions-intro
ACL: fine-grained key-based permission control, support multiple permission rules through selectors (#9974)
see https://redis.io/topics/acl#key-permissions and https://redis.io/topics/acl#selectors
Cluster: Support publish/subscribe functionality for sharding (specific nodes) (#8621)
see https://redis.io/topics/pubsub#sharded-pubsub
Provides first-class handling of subcommands in most cases, which may affect ACL classes, INFO command statistics, etc. (#9504, #10147)
Command metadata and documentation updates (#10104)
Check out https://redis.io/commands/command-docs, https://redis.io/topics/command-tips
Command key-specs: Provides a better way for clients to locate key parameters and read/write purpose
(#8324, #10122, #10167)
see https://redis.io/topics/key-specs
Use Multi-Part AOF mechanism to avoid AOF rewrite overhead (#9788)
Cluster: Support hostname instead of only IP address (#9530)
Optimize memory overhead management for network buffers, and add option to drop clients when total memory exceeds limit (#8687)
Cluster: Add mechanism to disconnect cluster bus to prevent uncontrolled buffer growth (#9774)
AOF: Add timestamp annotation and support for point-in-time recovery (#9326)
Lua: Support Function flags in EVAL scripts (#10126)
see https://redis.io/topics/eval-intro#eval-flags
Lua: RESP3 protocol responds to Verbatim and Big-Number types (#9202)
Lua: Redis version can be obtained via redis.REDIS_VERSION, redis.REDIS_VERSION_NUM commands (#10066)

Performance and resource utilization improvements

Significantly optimize latency and reduce memory overhead in cluster mode (#9356)
Reduce memory overhead in scenarios with many zset or hash keys (#9228)
Copy backlog buffer and master-slave copy buffer use a globally shared buffer (#9166)
Reduce memory overhead for copy-on-write (#8974)
Free up unused capacity in cluster send buffers (#9255)

Optimize memory efficiency to fully utilize client-side structure memory for reply buffers (#8968)
Replace ziplist with listpack in Hash, List, Zset (#8887, #9366, #9740)
Add support for list type to store elements larger than 4GB (#9357)
Added a pool for temporary client objects for reuse in module operations (#9940)
Remove command argument count limit, grow argv buffer dynamically (#9528)
Optimize list operations to start searching from the side closer to the element (#9454)
Improve fsync to avoid heavy writes to disk (#9409)
BITSET and BITFIELD SET are only propagated when the value actually changes (#9403)
Reduce latency when client is blocked by module unlock (#9593)

See the release note for details. https://github.com/redis/redis/releases/tag/7.0-rc1

Redis 7.0 首个 RC 版已发布了一段时间。新版本包含多个面向用户的新功能、显着的性能优化和许多其他改进。与此同时还引入了可能会破坏兼容性的变更,因此使用者在升级时需要确认是否受影响。

需要特别注意以下变更:

Redis 7 将 AOF 作为多个文件存储在一个文件夹中
Redis 7 为 RDB 文件应用了新版本 (version 10) 格式,与旧版本不兼容
Redis 7 在加载较旧的 RDB 格式时会动态地将 ziplist 编码的 key 转换为 listpacks。此过程通常发生在从 RDB 加载文件或者主从复制之间,且会增加加载时间

新特性

Redis Functions:使用服务器脚本扩展 Redis 的新方法 (#8693)
see https://redis.io/topics/functions-intro
ACL:细粒度的基于 key 的权限控制,通过 selectors 支持多种权限规则 (#9974)
see https://redis.io/topics/acl#key-permissions and https://redis.io/topics/acl#selectors
Cluster:支持用于分片(特定节点)的发布/订阅功能 (#8621)
see https://redis.io/topics/pubsub#sharded-pubsub
在大多数情况下对子命令提供一流处理,这可能会对 ACL 类别、INFO 命令统计等造成影响 (#9504, #10147)
命令元数据和文档更新 (#10104)
查看 https://redis.io/commands/command-docs, https://redis.io/topics/command-tips
Command key-specs:为 client 定位 key 参数和 read/write purpose 提供更好的方法
(#8324, #10122, #10167)
see https://redis.io/topics/key-specs
使用 Multi-Part AOF 机制避免 AOF 的重写开销 (#9788)
Cluster:支持主机名,不再是此前的仅支持 IP 地址 (#9530)
优化网络缓冲区的内存开销管理,以及增加当总内存超过限制时删除客户端的选项 (#8687)
Cluster:增加断开集群总线连接的机制,以防止缓冲区不受控制的增长 (#9774)
AOF:增加时间戳注解和对基于时间点恢复的支持 (#9326)
Lua:支持 EVAL 脚本中的 Function flags (#10126)
see https://redis.io/topics/eval-intro#eval-flags
Lua:RESP3 协议响应 Verbatim 和 Big-Number 类型 (#9202)
Lua:可通过 redis.REDIS_VERSION, redis.REDIS_VERSION_NUM 命令获取 Redis 版本 (#10066)

性能和资源利用改进

集群模式下显著优化延迟并降低内存开销 (#9356)
在具有很多 zset 或 hash key 的场景时降低内存开销 (#9228)
复制积压缓冲区和主从复制缓冲区使用一个全局共享的缓冲区 (#9166)
减少 copy-on-write 的内存开销 (#8974)
释放集群发送缓冲区中未使用的容量 (#9255)

优化内存效率,充分利用客户端结构内存用于回复缓冲区 (#8968)
在 Hash, List, Zset 中将 ziplist 替换为 listpack (#8887, #9366, #9740)
添加对 list 类型的支持以存储大于 4GB 的元素 (#9357)
为临时客户端对象添加了一个池,以便在模块操作中重复使用 (#9940)
移除命令参数计数限制,动态增长 argv 缓冲区 (#9528)
优化 list 操作,从更靠近元素的一侧开始查找 (#9454)
改进 fsync 以避免大量写入磁盘 (#9409)
BITSET 和 BITFIELD SET 仅在值实际更改时传播 (#9403)
降低客户端被模块解锁阻塞时的延时 (#9593)

详情查看 release note。https://github.com/redis/redis/releases/tag/7.0-rc1

发表评论

后才能评论