当前位置:网站首页>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
边栏推荐
- 数据库系统原理与应用教程(001)—— MySQL 安装与配置:MySQL 软件的安装(windows 环境)
- 數據庫系統原理與應用教程(006)—— 編譯安裝 MySQL5.7(Linux 環境)
- UML旅游管理系统「建议收藏」
- 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
- 红队第10篇:coldfusion反序列化过waf改exp拿靶标的艰难过程
- Golang爬虫框架初探
- Sword finger offer II 015 All modifiers in the string
- SQL question brushing 1050 Actors and directors who have worked together at least three times
- PostgreSQL 存储结构浅析
猜你喜欢

Bugku's file contains

How to restore the system of Sony laptop

數據庫系統原理與應用教程(006)—— 編譯安裝 MySQL5.7(Linux 環境)

Are you still using charged document management tools? I have a better choice! Completely free

sql刷题584. 寻找用户推荐人
![[live broadcast appointment] database obcp certification comprehensive upgrade open class](/img/50/83a533f4e8a60f90e03b991385c08d.jpg)
[live broadcast appointment] database obcp certification comprehensive upgrade open class

全面看待企业数字化转型的价值

Ring iron pronunciation, dynamic and noiseless, strong and brilliant, magic wave hifiair Bluetooth headset evaluation

VMware 虛擬機啟動時出現故障:VMware Workstation 與 Hyper-v 不兼容...

SQL question brushing 586 Customers with the most orders
随机推荐
Building blocks for domestic databases, stonedb integrated real-time HTAP database is officially open source!
Today, at 14:00, 15 ICLR speakers from Hong Kong University, Beihang, Yale, Tsinghua University, Canada, etc. continue!
模板引擎Velocity 基础
Is the securities account given by the head teacher of goucai school safe? Can I open an account?
Research and investment strategy report of China's sodium sulfate industry (2022 Edition)
Guide for high-end programmers to fish at work
C language input / output stream and file operation
【Kotlin】高阶函数介绍
求求你们,别再刷 Star 了!这跟“爱国”没关系!
FPN network details
用手机在同花顺上开户靠谱吗?这样有没有什么安全隐患
数据库系统原理与应用教程(004)—— MySQL 安装与配置:重置 MySQL 登录密码(windows 环境)
Template Engine Velocity Foundation
Flux d'entrées / sorties et opérations de fichiers en langage C
PR basic clip operation / video export operation
【直播预约】数据库OBCP认证全面升级公开课
C語言輸入/輸出流和文件操作
P2592 [zjoi2008] birthday party (DP)
VMware 虛擬機啟動時出現故障:VMware Workstation 與 Hyper-v 不兼容...
What is the effect of choosing game shield safely in the game industry?