Redis 7.0支持的新特性說明
更新時間 2024-09-05 12:07:00
最近更新時間: 2024-09-05 12:07:00
分享文章
本文介紹Redis 7.0支持的新特性說明
新增COMMAND DOCS命令
可以輸出命令的文檔信息
redis> COMMAND DOCS SET
1) "set"
2) 1) "summary"
2) "Sets the string value of a key, ignoring its type. The key is created if it doesn't exist."
3) "since"
4) "1.0.0"
5) "group"
6) "string"
7) "complexity"
8) "O(1)"
9) "history"
10) 1) 1) "2.6.12"
2) "Added the `EX`, `PX`, `NX` and `XX` options."
2) 1) "6.0.0"
2) "Added the `KEEPTTL` option."
3) 1) "6.2.0"
2) "Added the `GET`, `EXAT` and `PXAT` option."
4) 1) "7.0.0"
2) "Allowed the `NX` and `GET` options to be used together."
11) "arguments"
12) 1) 1) "name"
2) "key"
3) "type"
4) "key"
5) "display_text"
6) "key"
7) "key_spec_index"
8) (integer) 0
2) 1) "name"
2) "value"
3) "type"
4) "string"
5) "display_text"
6) "value"
3) 1) "name"
2) "condition"
3) "type"
4) "oneof"
5) "since"
6) "2.6.12"
7) "flags"
8) 1) "optional"
9) "arguments"
10) 1) 1) "name"
2) "nx"
3) "type"
4) "pure-token"
5) "display_text"
6) "nx"
7) "token"
8) "NX"
2) 1) "name"
2) "xx"
3) "type"
4) "pure-token"
5) "display_text"
6) "xx"
7) "token"
8) "XX"
4) 1) "name"
2) "get"
3) "type"
4) "pure-token"
5) "display_text"
6) "get"
7) "token"
8) "GET"
9) "since"
10) "6.2.0"
11) "flags"
12) 1) "optional"
5) 1) "name"
2) "expiration"
3) "type"
4) "oneof"
5) "flags"
6) 1) "optional"
7) "arguments"
8) 1) 1) "name"
2) "seconds"
3) "type"
4) "integer"
5) "display_text"
6) "seconds"
7) "token"
8) "EX"
9) "since"
10) "2.6.12"
2) 1) "name"
2) "milliseconds"
3) "type"
4) "integer"
5) "display_text"
6) "milliseconds"
7) "token"
8) "PX"
9) "since"
10) "2.6.12"
3) 1) "name"
2) "unix-time-seconds"
3) "type"
4) "unix-time"
5) "display_text"
6) "unix-time-seconds"
7) "token"
8) "EXAT"
9) "since"
10) "6.2.0"
4) 1) "name"
2) "unix-time-milliseconds"
3) "type"
4) "unix-time"
5) "display_text"
6) "unix-time-milliseconds"
7) "token"
8) "PXAT"
9) "since"
10) "6.2.0"
5) 1) "name"
2) "keepttl"
3) "type"
4) "pure-token"
5) "display_text"
6) "keepttl"
7) "token"
8) "KEEPTTL"
9) "since"
10) "6.0.0"
redis>
性能提升
- 優化Streams相關命令
- 優化pipeline批量命令執行的性能
- 優化INFO的latency的性能
- 優化多副本的性能
- 數據類型Hash,List, Zset的底層數據結構用listpack替換了ziplist
- 列表(List)的數據類型可以存儲超過4GB的單個元素
- 降低了copy-on-write期間的內存使用
- 在使用大量散列(Hash)或者有序集合(Zset)時節省了大量的內存
- 在集群模式下,節省了大量的內存并且降低了系統整體的延遲時間
- 在集群中,當一個主節點重啟之后,從節點不再需要做完全同步,只需要做部分同步即可
- 當Redis啟動時,總是建立一個AOF文件用于持久化
- 降低了長期沒有響應客戶(idle, stale client)的內存使用
- 降低了在客戶回復數據包中的對于寫的系統調用次數,也同時降低了TCP packet的數目