Redis6.0版本特性介绍

Introduction to the Redis 6 release

Redis 6 improves Redis in a number of key areas and is one of the largest
Redis releases in the history of the project, so here we’ll list only
the biggest features in this release:

  • The modules system now has a number of new APIs that allow module authors
    to make things otherwise not possible in the past. It is possible to
    store arbitrary module private data in RDB files, to hook on different
    server events, capture and rewrite commands executions, block clients on
    keys, and so forth.

    模块系统提供了一些新的API,允许模块作者使用新的功能。可以存储任意模块私有数据到RDB文件,钩子在不同的服务器事件,捕获和重写命令执行,阻止客户端,以及等等。

  • The Redis active expire cycle was rewritten for much faster eviction of keys
    that are already expired. Now the effort is tunable.

    Redis活跃过期周期被重写,使得更快的过期键被清除。现在这个力度是可调的。

  • Redis now supports SSL on all channels.

    Redis现在支持所有通道的SSL。

  • ACL support, you can define users that can run only certain commands and/or
    can only access only certain keys patterns.

    ACL支持,你可以定义只能运行某些命令和/或只能访问某些特定key的用户。

  • Redis now supports a new protocol called RESP3, which returns more
    semantical replies: new clients using this protocol can understand just
    from the reply what type to return to the calling program.

    Redis现在支持新协议RESP3,它返回更为语义化的回复:使用这个协议的新客户端可以从回复中知道返回类型。

  • There is server-side support for client-side caching of key values. This
    feature is still experimental and will get more changes during the next
    release candidates, but you can already test it and read about it here:
    https://redis.io/topics/client-side-caching

    有服务器端支持客户端键值缓存。这个功能仍然是实验性的,将会在下一个发行候选版本中有更多的变化,但你可以已经测试它并阅读关于它的更多信息。

  • Redis can now optionally use threads to handle I/O, allowing to serve
    2 times as much operations per second in a single instance when
    pipelining cannot be used.

    Redis现在可以选择使用线程来处理I/O,单实例在不能使用Pipeline时,每秒可以提供操作数量可以达到以前的2倍。

  • Diskless replication is now supported even on replicas: a replica is now
    able, under certain conditions the user can configure, to load the RDB
    in the first synchronization directly from the socket to the memory.

    副本实例现在也支持无磁盘复制了:在某些条件下,用户可以通过配置,使副本实例从套接字直接加载RDB到内存。

  • Redis-benchmark now supports a Redis Cluster mode.

    Redis-benchmark现在支持Redis Cluster模式了

  • SRANDMEMBER and similar commands have a better distribution.

    SRANDMEMBER等命令提供更好的取值分布。

  • Redis-cli improvements.

    Redis-cli提升

  • Systemd support rewritten.

    Systemd支持被重写了

  • A Redis Cluster proxy was released here:
    https://github.com/artix75/redis-cluster-proxy

    Redis集群代理已经发布在这里

  • A Disque module for Redis was released here:
    https://github.com/antirez/disque-module

    Redis的Disque模块已经发布在这里

Redis 6.0 is mostly a strict superset of 5.0, you should not have any problem
upgrading your application from 5.0 to 6.0. However this is a list of small
non-backward compatible changes introduced in the 6.0 release:

Redis 6.0 是 5.0版本的严格子集,你从5.0版本升级到6.0版本应该不会有什么问题。但是,这是6.0版本中新增的一些非向后兼容的变更:

  • The SPOP command no longer returns null when the set key does not
    exist. Now it returns the empty set as it should and as happens when it is
    called with a 0 argument. This is technically a fix, however it changes the
    old behavior.

    SPOP <count> 命令在key不存在的时候,不回返回null了,现在它返回空集合,并且参数是0时,也返回空集合。理论上这时一个问题修复,但它改变了命令的返回结果。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值