简体   繁体   English

Redis 6 多线程和多个Redis数据库

[英]Redis 6 Multithreading and multiple Redis databases

I'm trying to get more familiar with Redis, and I found that the Redis 6 release notes say the following:我试图更熟悉 Redis,我发现Redis 6 发行说明如下:

Redis 6 rings in a new era: while it retains a core single-threaded data-access interface, I/O is now threaded. Redis 6 在新时代响起:在保留核心单线程数据访问接口的同时,I/O 现在是线程化的。

This multithreading seems particularly useful for writes, as mentioned in the redis.conf这种多线程似乎对写入特别有用,如redis.conf中所述

Multiple databases in Redis has been discussed several times, like at StackOverflow and Redis DB google group . Redis 中的多个数据库已经多次讨论过,比如在StackOverflowRedis DB google group The StackOverflow answer says the following: StackOverflow 的回答如下:

It is deprecated and, as you noted, multiple instances lets you take advantage of multiple cores.它已被弃用,正如您所指出的,多个实例可让您利用多个核心。

Because the Redis 6 release notes say "a core single-threaded data-access interface" is retained - does this mean multiple instances of Redis will still take better advantage of multiple cores for data accessing than multiple Redis databases on a single Redis instance will?因为 Redis 6 发行说明中说“一个核心的单线程数据访问接口”被保留了——这是否意味着多个 Redis 实例仍然会比单个 Redis 实例上的多个 Redis 数据库更好地利用多核进行数据访问?

Does retaining "a core single-threaded data-access interface" mean that all data-access commands (like GET, SET), regardless of which database in the redis instances, will have to go through this interface (rather than multiple data-access interfaces if we used multiple Redis instances instead) ?保留“核心单线程数据访问接口”是否意味着所有数据访问命令(如 GET、SET),无论 redis 实例中的哪个数据库,都必须通过此接口(而不是多个数据访问如果我们使用多个 Redis 实例来代替接口)?

Thanks!谢谢!

Because the Redis 6 release notes say "a core single-threaded data-access interface" is retained - does this mean multiple instances of Redis will still take better advantage of multiple cores for data accessing than multiple Redis databases on a single Redis instance will?因为 Redis 6 发行说明中说“一个核心的单线程数据访问接口”被保留了——这是否意味着多个 Redis 实例仍然会比单个 Redis 实例上的多个 Redis 数据库更好地利用多核进行数据访问?

Yes, multiple instances of Redis will probably have have better utilization of a multi-core server.是的,Redis 的多个实例可能会更好地利用多核服务器。

Does retaining "a core single-threaded data-access interface" mean that all data-access commands (like GET, SET), regardless of which database in the redis instances, will have to go through this interface (rather than multiple data-access interfaces if we used multiple Redis instances instead) ?保留“核心单线程数据访问接口”是否意味着所有数据访问命令(如 GET、SET),无论 redis 实例中的哪个数据库,都必须通过此接口(而不是多个数据访问如果我们使用多个 Redis 实例来代替接口)?

Yes, Redis 6 maintains this property.是的,Redis 6 维护了这个属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM