当前位置:网站首页>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
边栏推荐
- 游戏行业安全选择游戏盾,效果怎么样?
- VMware 虚拟机启动时出现故障:VMware Workstation 与 Hyper-v 不兼容...
- VMware virtual machine failed during startup: VMware Workstation is incompatible with hyper-v
- Go language source level debugger delve
- [kotlin] Introduction to higher-order functions
- 数据库系统原理与应用教程(003)—— MySQL 安装与配置:手工配置 MySQL(windows 环境)
- How to use MySQL language for row and column devices?
- The supply of chips has turned to excess, and the daily output of Chinese chips has increased to 1billion, which will make it more difficult for foreign chips
- 数据库系统原理与应用教程(006)—— 编译安装 MySQL5.7(Linux 环境)
- 红队第8篇:盲猜包体对上传漏洞的艰难利用过程
猜你喜欢

SQL question brushing 584 Looking for user references

为国产数据库添砖加瓦,StoneDB 一体化实时 HTAP 数据库正式开源!

EndeavourOS移动硬盘安装

How to maintain the laptop battery

数据库系统原理与应用教程(003)—— MySQL 安装与配置:手工配置 MySQL(windows 环境)

Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers

今天14:00 | 港大、北航、耶鲁、清华、加大等15位ICLR一作讲者精彩继续!

嗨 FUN 一夏,与 StarRocks 一起玩转 SQL Planner!

Installation and use of sqoop

博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
随机推荐
Principes et applications du système de base de données (006) - - compilation et installation de MySQL 5.7 (environnement Linux)
China carbon disulfide industry research and investment strategy report (2022 Edition)
Is the securities account given by the head teacher of goucai school safe? Can I open an account?
[observation] where is the consulting going in the digital age? Thoughts and actions of softcom consulting
拼接字符串,得到字典序最小的结果
Are you still using charged document management tools? I have a better choice! Completely free
[nodemon] app crashed - waiting for file changes before starting...解决方法
Basic use of MySQL
Origin2018安装与使用(整理中)
P2592 [zjoi2008] birthday party (DP)
Redis6.0 新功能
模板引擎Velocity 基礎
瑞典公布决定排除华为5G设备,但是华为已成功找到新出路
虚拟串口模拟器和串口调试助手使用教程「建议收藏」
The sharp drop in electricity consumption in Guangdong shows that the substitution of high-tech industries for high-energy consumption industries has achieved preliminary results
C語言輸入/輸出流和文件操作
sql刷题627. 变更性别
你还在用收费的文档管理工具?我这有更牛逼的选择!完全免费
Virtual serial port simulator and serial port debugging assistant tutorial "suggestions collection"
Example of vim user automatic command