Redis6 Introduction to core features - Multithreading
new edition Redis6 Feature explanation
Multithreading support
redis6 Multithreading is only used to process the reading and writing of network data and protocol analysis , The underlying data operation is still single thread
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
Not on by default
io-threads-do-reads yes
io-threads Number of threads
The official advice ( The number of threads is less than the number of machine cores )
4 The recommended setting for the core machine is 2 or 3 Threads
8 The recommended setting for kernel is 4 or 6 Threads ,
When multithreading is turned on , Whether there will be thread concurrency security issues ?
There will be no safety problems ,Redis The multithreading part is only used to process network data reading and writing and protocol parsing , The execution command is still executed in a single thread sequence .
acl Access control
Introduced ACL(Access Control List)
Previous redis There is no user concept ,redis6 Introduced acl
You can assign different permissions to each user to control permissions
Improve security by restricting access to commands and keys , So that untrusted clients cannot access
Improve operational safety , Prevent people from accessing the software or process by mistake Redis, Thus damaging data or configuration
file :https://redis.io/topics/acl
Common commands
acl list Currently enabled ACL The rules
acl cat List of supported permission classifications
acl cat hash Returns the command in the specified category
acl setuser Create and modify user commands
acl deluser Delete user command
Client cache
new edition Redis6 Feature explanation
client side caching Client cache
Similar to browser cache
The static file is updated on the server side ( Such as css、js、 picture ), Be able to get timely updates on the client , But I don't want the browser to get static resources from the server every request
Like the front end -Expires、Last-Modified、Etag Cache control
file :https://redis.io/topics/client-side-caching
copyright:author[You and other students],Please bring the original link to reprint, thank you.
https://en.javamana.com/2022/02/202202130808428665.html