antirez: Redis6 really come

December 20, Redis released Redis6-rc1 version, author antirez also in his blog announced the news, and Redis6 version made some introduction, the following is a translation.

Yes, the new version of Redis has reached release candidate status (RC version), a few months later, you can see the new version of Redis in the major application market. I think this is probably by far, Redis closest to the "enterprise" version of the application, interestingly, before that I took a long time to understand what is the enterprise-class applications. I think I do not like that word, but it still has some significance. Redis can now be said to be everywhere, and still be able to "downsizing": You can download it, compile in 30 seconds, then do not need to start it under any circumstances configuration. But everywhere it means that encryption and ACL like the environment and must be supported, therefore Redis have to thank me, even though I tried to pursue simplicity.

Interestingly, Redis ACL albeit in an arbitrary fashion to add, but it's almost what you see in other systems are not the same, support for SSL and it took several iterations to achieve the ultimate use of the most the idea of ​​the significance of purpose. From simple as possible so that the core function point of view, I was very satisfied with these changes.

Redis6 brought us not only ACLs and SSL, as far as I know, this is the most versatile Redis issue, but also the participation of the largest number of a version. Who Redis6 have contributed to it? I generated a list of contributors (I know this list sucks, I simply generate a bit), they have at least two commit, and does not include the merge commit. In addition, since I have been here or there to repair a lot of small things, so I submitted the number may be far more than others.

685  antirez
81  zhaozhao.zz
76  Oran Agra
51  artix
28  Madelyn Olson
27  Yossi Gottlieb
15  David Carlier
14  Guy Benoish
14  Guy Korland
13  Itamar Haber
9  Angus Pearson
8  WuYunlong
8  yongman
7  vattezhang
7  Chris Lamb
5  Dvir Volk
5  [email protected]
5  chendianqiang
5  John Sully
4  dejun.xdj
4  Daniel Dai
4  Johannes Truschnigg
4  swilly22
3  Bruce Merry
3  filipecosta90
3  youjiali1995
2  James Rouzier
2  Andrey Bugaevskiy
2  Brad Solomon
2  Hamid Alaei
2  Michael Chaten
2  Steve Webster
2  Wander Hillen
2  Weiliang Li
2  Yuan Zhou
2  charsyam
2  hujie
2  jem
2  shenlongxing
2  valentino
2  zhudacai 00228490
2  喜欢兰花山丘

Thanks for your contribution to the above, this is a great team.

The following list is a list of new features:

  • Many new modules API
  • Better Expiration Period
  • SSL
  • ACLs
  • RESP3
  • Client-side caching
  • 线程 I / O
  • Diskless copy on the replica
  • Redis-benchmark support cluster + Redis-cli improvements
  • The system supports rewriting
  • Redis Cluster agent released together with Redis6 (different warehouses)
  • Redis 6 released Disque module (different warehouses)

As you can see, there are many relatively large changes, then I will choose a few introduced.

RESP3

After 10 years, we need a new agreement, and I had extensive discussions in this blog: http: //antirez.com/news/125, but then I changed my mind, so RESP3 is "the choice Redis6 to join. " Connection is the beginning RESP2 mode only when you use a new command HELLO handshake, you will enter a new protocol mode.

Why do we need a new agreement? Because the old semantics is not clear enough. RESP3 There are other features, but the main idea is to be able to return directly from the Redis complex data types, and the client does not have to know which type you want to convert to an array, or whether the number returned can be converted to a Boolean value, and so on.

Since RESP3 not the only protocol, so its use is slower than expected number, but this is perhaps not a bad thing, because that gives us enough time to adapt and adjust.

ACLs

Redis ACLs on the ACL is the best introduction to the document itself (https://redis.io/topics/acl), even though it may require some updated to match recent changes. Here I would also like to discuss the motivation to use it. Redis is required ACLs in some operations because people need more extensive use of ACLs, to achieve better control of the client can do. Another increase is mainly due to ACLs isolation to protect the data from application errors infringement. If you work node can only do BRPOPLPUSH operation, then the new opportunities for developers to use FLUSHALL is relatively small, it is possible to reduce the production environment to perform FLUSHALL possibilities.

In operation Redis in ACLs are free, because if you do not have them, not affected the performance, after all, this part of the cost can not be measured. I think this is the best approach, it is worth mentioning that, we now offer Redis module interface ACL, so you can write custom authentication method.

SSL

It is 2019, going up to 2020, so there are some new rules. The only question is how to execute properly, the correct execution of the premise is wrong to perform and understand their limitations, and then connect abstract Redis to perform properly. This work is carried out entirely without my help, which also reflects the change Redis development process.

Client-side caching

About client cache, I wrote a blog (http://antirez.com/news/130), but I think this is the most immature Redis6 function. Yes, the server can assist you in the client cache, it looks cool, but I want to further optimize this function before Redis6 GA version comes out. In particular, to add a new model, in this mode, the server does not maintain client state or as little as possible to maintain client state, greater use of interactive messages. And now we can not be certain "cache slots" expired messages are combined into one. It is a good idea, we will focus on that part feature in January.

Disque become a module

In the end, I did it (https://github.com/antirez/disque-module), I am very satisfied with this result.

Disque Redis as a module really powerful module system display. Cluster bus message the API, clients can be prevented and recovery timer, the AOF of private data and RDB control module. If you do not know what is Disque, this can take a look README warehouse.

Cluster agent

My colleague Fabio spent several months in this work: https: //github.com/artix75/redis-cluster-proxy

I would like to see this feature for many years, when the subject is Redis clustering support, operations need to make the client always very scattered, and now we have an agent (still in progress), you can do a lot of interesting things . The main function is to abstract Redis cluster client as if they are the same as a single instance of communication. Another feature is simply and at least the client using only simple commands and functions when multiplexing is performed. When you want to stop or perform the transaction, a proxy for the client is assigned a different set of connection. Acting is completely thread-level, so let most of the CPU time is spent on I / O, this is a good way to maximize CPU usage. You can view the README file, then try this feature.

Modules

Redis6 module API is a completely new level of. This is one of the fastest developing part Redis, because we use the module system from the very beginning to develop a very complex thing, and not just trivial example. The front end of the time, I started Disque port, which prompted me to bring new features to the module system. Now, you can put Redis as a framework, you can tell the system as a module to write, to avoid re-create the wheel, but also can get the BSD license, Redis is actually an open platform that can be used to prepare the system.

internal

Redis has a lot of internal optimization: Copy command changed a lot of ways, expired use another algorithm that is faster and more pronounced cache.

Status and ETA

Now that we have RC1, I hope that in the end of March, at the latest in May, you can see the GA version is ready.

Now, Redis6 definitely testable, and little chance of an error is encountered. But it contains a lot of code changes, and new features from the new code components, also had no one to run the code in a production environment. So if you find a bug, please describe the best way to look at what happened and report to us.

People and thank all contributed to that version it helped us maintain people in a stable state in the next few months.

Ah, I almost forgot, this is the 6th edition of LOLWUT command interaction diagrams:

lolwut6

Each run will randomly generate different landscape.

Original blog address

http://antirez.com/news/131

Translator's Note

As the author says, Redis6 brought a lot of new features. Just released version certainly can not get online to play, but toss it in advance feel good. In particular RESP3 and client-side caching is I am more looking forward to. There is also a new algorithm expired, not how I heard this before, but also worthy of study. Do not say, I was first under King.

Guess you like

Origin www.cnblogs.com/Jackeyzhe/p/12094070.html