当前位置:网站首页>Redis6.0 new features
Redis6.0 new features
2022-07-01 16:47:00 【BugMaker-shen】
List of articles
One 、ACL Access control list
Redis ACL yes Access Control List( Access control list ) Abbreviation , This function allows some connections to be restricted according to the commands that can be executed and the keys that can be accessed
stay Redis 5 Before the release ,Redis The security rule is only password control And through rename To adjust high-risk orders, such as flushdb,KEYS* ,shutdown etc. .Redis 6 Provide ACL More fine-grained permission control for users :
(1) Access rights : User name and password
(2) Orders that can be executed
(3) It can be operated KEY
Refer to the official website :https://redis.io/topics/acl
1. Use acl list The command displays the user permission column

2. Use acl cat command
(1) View add permission instruction category

(2) Add the parameter type name to view the specific commands under the type

3. Use acl whoami Command to view the current user

4. Use acl setuser Command to create and edit users ACL
(1)ACL The rules
Here are the valid ACL List of rules , Some rules are only used to activate or delete flags , Or to users ACL A single word that performs a given change . Other rules are character prefixes , They are the same as the command or category name 、 Key mode, etc

(2) Create new user default permissions by command
acl setuser user1

In the example above , I didn't specify any rules at all . If the user doesn't exist , This will use just created To create a user . If the user already exists , Then the above command will not perform any operation
(3) Set user name 、 password 、ACL jurisdiction 、 And enabled users
acl setuser user2 on >password ~cached:* +get # user2 Only allowed cached: At the beginning key Conduct get operation

(4) Switching users , Verify permissions
auth user password

Two 、IO Multithreading
1. brief introduction
Redis6 Finally support multithreading , Say goodbye to single thread ?
IO Multithreading actually refers to the interactive part of the client The Internet IO Interactive processing module multithreading , Instead of multithreading commands ,Redis6 Executing commands is still single threaded
2. Principle framework
Redis 6 Join multithreading , But follow Memcached Such from IO There are some differences in the implementation mode of processing to data access multithreading
Redis The multithreading part is only used to process network data reading and writing and protocol parsing , Executing commands is still single threaded . The reason for this design is that we don't want to be complicated by multithreading , Need to control key、lua、 Business , LPUSH/LPOP And so on
The overall design is as follows :
in addition , Multithreaded network IO It is also not enabled by default , Need to reconfigure the file redis-6379.conf Middle configuration
io-threads-do-reads yes
io-threads 4
3、 ... and 、 Cluster tool support Cluster
The old version Redis If you want to build a cluster, you need to install it separately ruby Environmental Science ,Redis 5 take redis-trib.rb Integrated into redis-cli. Another official redis-benchmark Tools start to support cluster The model , Through the way of multithreading, the pressure test is carried out for multiple pieces .

Four 、Redis6 Other new features
RESP3 new Redis Communication protocol : Optimize the communication between server and client
Client side caching Client cache : be based on RESP3 The client cache function of the protocol . by Further improve the performance of cache , The data that the client often accesses cache To client . Reduce TCP The Internet Interaction .
Proxy Cluster agent mode :Proxy function , Give Way Cluster It has the same access method as single instance , Reduce your use cluster Threshold . However, it should be noted that the agent does not change Cluster The functional limitations of , No The supported commands will not support , For example, cross slot More Key operation .
Modules API Redis 6 Middle module API Great development progress , because Redis Labs To develop complex functions , From one Use it at the beginning Redis modular .Redis Can become a framework , utilize Modules To build different systems , and There is no need to write from scratch and then BSD The license .Redis From the beginning, it was an open system for writing various systems platform
边栏推荐
- Germany if was crowned with many awards. How strong is this pair of headphones? In depth evaluation of yinpo GTW 270 hybrid
- Research and investment strategy report of hydroxypropyl beta cyclodextrin industry in China (2022 Edition)
- MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一
- 阿里云、追一科技抢滩对话式AI
- Apple's self-developed baseband chip failed again, which shows Huawei Hisilicon's technological leadership
- China benzene hydrogenation Market Research and investment forecast report (2022 Edition)
- FPN network details
- 数据库系统原理与应用教程(002)—— MySQL 安装与配置:MySQL 软件的卸载(windows 环境)
- Leetcode 77 combination -- backtracking method
- How to maintain the laptop battery
猜你喜欢

How to solve the problem that the battery icon of notebook computer does not display

C语言输入/输出流和文件操作

Tutorial on principles and applications of database system (004) -- MySQL installation and configuration: resetting MySQL login password (Windows Environment)

VMware 虚拟机启动时出现故障:VMware Workstation 与 Hyper-v 不兼容...

Sqlserver query: when a.id is the same as b.id, and the A.P corresponding to a.id cannot be found in the B.P corresponding to b.id, the a.id and A.P will be displayed

Detailed explanation of activity life cycle and startup mode

MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一

What is the effect of choosing game shield safely in the game industry?

苹果自研基带芯片再次失败,说明了华为海思的技术领先性

Guide for high-end programmers to fish at work
随机推荐
What is the digital transformation of manufacturing industry
独家消息:阿里云悄然推出RPA云电脑,已与多家RPA厂商开放合作
模板引擎Velocity 基礎
Leetcode 216 combined summation III -- backtracking method
巴比特 | 元宇宙每日必读:奈雪币、元宇宙乐园、虚拟股票游戏...奈雪的茶这波“操作拉满”的营销活动你看懂了吗?...
C语言输入/输出流和文件操作
Detailed explanation of activity life cycle and startup mode
UML tourism management system "suggestions collection"
How does go use symmetric encryption?
判断一棵二叉树是否为平衡二叉树
Zabbix2.2 monitoring system and application log monitoring alarm
用手机在同花顺上开户靠谱吗?这样有没有什么安全隐患
Redis 分布式锁
接口测试框架中的鉴权处理
Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers
Introduction to software engineering - Chapter 6 - detailed design
虚拟串口模拟器和串口调试助手使用教程「建议收藏」
How to solve the problem that the battery icon of notebook computer does not display
数据库系统原理与应用教程(003)—— MySQL 安装与配置:手工配置 MySQL(windows 环境)