当前位置:网站首页>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
边栏推荐
- 如何使用phpIPAM来管理IP地址和子网
- Basic use of MySQL
- 苹果自研基带芯片再次失败,说明了华为海思的技术领先性
- How to maintain the laptop battery
- Why is the pkg/errors tripartite library more recommended for go language error handling?
- Sword finger offer II 015 All modifiers in the string
- How to use MySQL language for row and column devices?
- Golang爬虫框架初探
- Zabbix2.2监控之系统及应用日志监控报警
- Redis 分布式锁
猜你喜欢

Detailed explanation of activity life cycle and startup mode
![[live broadcast appointment] database obcp certification comprehensive upgrade open class](/img/50/83a533f4e8a60f90e03b991385c08d.jpg)
[live broadcast appointment] database obcp certification comprehensive upgrade open class

制造业数字化转型究竟是什么

How to maintain the laptop battery

芯片供应转向过剩,中国芯片日产增加至10亿,国外芯片将更难受

Comprehensively view the value of enterprise digital transformation

sql刷题586. 订单最多的客户

Sweden announced its decision to exclude Huawei 5g equipment, but Huawei has successfully found a new way out

SQL question brushing 627 Change gender

SQL question brushing 586 Customers with the most orders
随机推荐
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
Research and investment strategy report of China's sodium sulfate industry (2022 Edition)
Défaillance lors du démarrage de la machine virtuelle VMware: le poste de travail VMware n'est pas compatible avec hyper - V...
阿里云、追一科技抢滩对话式AI
Basic use of MySQL
模板引擎Velocity 基础
Sweden announced its decision to exclude Huawei 5g equipment, but Huawei has successfully found a new way out
China carbon disulfide industry research and investment strategy report (2022 Edition)
Go 语言错误处理为什么更推荐使用 pkg/errors 三方库?
SystemVerilog-结构体(二)
想做软件测试的女孩子看这里
Tutorial on the principle and application of database system (001) -- MySQL installation and configuration: installation of MySQL software (Windows Environment)
Sword finger offer II 015 All modifiers in the string
Stegano in the world of attack and defense
Red team Chapter 8: blind guess the difficult utilization process of the package to upload vulnerabilities
Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers
Rhcsa Road
Zabbix2.2 monitoring system and application log monitoring alarm
Today, at 14:00, 15 ICLR speakers from Hong Kong University, Beihang, Yale, Tsinghua University, Canada, etc. continue!
巴比特 | 元宇宙每日必读:奈雪币、元宇宙乐园、虚拟股票游戏...奈雪的茶这波“操作拉满”的营销活动你看懂了吗?...