当前位置:网站首页>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
边栏推荐
- Rhcsa Road
- AI高考志愿填报:大厂神仙打架,考生付费围观
- 數據庫系統原理與應用教程(006)—— 編譯安裝 MySQL5.7(Linux 環境)
- How does go use symmetric encryption?
- Go 语言错误处理为什么更推荐使用 pkg/errors 三方库?
- Authentication processing in interface testing framework
- 制造业数字化转型究竟是什么
- 为国产数据库添砖加瓦,StoneDB 一体化实时 HTAP 数据库正式开源!
- Zabbix2.2 monitoring system and application log monitoring alarm
- What is the effect of choosing game shield safely in the game industry?
猜你喜欢
Are you still using charged document management tools? I have a better choice! Completely free
想做软件测试的女孩子看这里
Alibaba cloud, Zhuoyi technology beach grabbing dialogue AI
Tutorial on principles and applications of database system (006) -- compiling and installing MySQL 5.7 (Linux Environment)
Internet News: "20220222" get together to get licenses; Many products of Jimi have been affirmed by consumers; Starbucks was fined for using expired ingredients in two stores
SQL question brushing 586 Customers with the most orders
Germany if was crowned with many awards. How strong is this pair of headphones? In depth evaluation of yinpo GTW 270 hybrid
Ring iron pronunciation, dynamic and noiseless, strong and brilliant, magic wave hifiair Bluetooth headset evaluation
你还在用收费的文档管理工具?我这有更牛逼的选择!完全免费
Dataframe gets the number of words in the string
随机推荐
sql刷题1050. 合作过至少三次的演员和导演
Redis 分布式鎖
为国产数据库添砖加瓦,StoneDB 一体化实时 HTAP 数据库正式开源!
Stonedb is building blocks for domestic databases, and the integrated real-time HTAP database based on MySQL is officially open source!
【观察】数字化时代的咨询往何处走?软通咨询的思与行
How to restore the system of Sony laptop
瑞典公布决定排除华为5G设备,但是华为已成功找到新出路
【flask入门系列】Cookie与Session
苹果自研基带芯片再次失败,说明了华为海思的技术领先性
China nylon 11 industry research and future forecast report (2022 Edition)
UML tourism management system "suggestions collection"
sql刷题584. 寻找用户推荐人
Germany if was crowned with many awards. How strong is this pair of headphones? In depth evaluation of yinpo GTW 270 hybrid
Comprehensively view the value of enterprise digital transformation
Authentication processing in interface testing framework
VMware 虛擬機啟動時出現故障:VMware Workstation 與 Hyper-v 不兼容...
How to repair the laptop that cannot connect to the wireless network
【PyG】文档总结以及项目经验(持续更新
Research and investment strategy report of neutral protease industry in China (2022 Edition)
判断二叉树是否为二叉搜索树