snehac-miner / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

[Feature Request] Multi-threaded? Any plans? #102

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Are there any plans to make Redis multi-threaded?

It seems like having fewer instances that can use more server resources
would be good from both the management and scalability perspective.

I know that Redis can distribute keys across many servers. However, that is
only useful in situations where there is many keys.

I also know that Redis can be replicated. However, masters and slaves can
become out of sync based on my understanding of the implementation (when
the master dies before the slave gets the update). So, this is only useful
when some data loss is tolerable.

So, in situations where there are few keys (distribution is not effective
here) and data timeliness is important, being multi-threaded would make the
application more scalable.

Original issue reported on code.google.com by gwebmast...@yahoo.com on 17 Nov 2009 at 7:25

GoogleCodeExporter commented 8 years ago
there are two main reasons to avoid multi threading:

- a few tests showed that there is no significant gain, actually the current 
design may be the fastest in many use cases.
- with redis-cluster there will be a simple and obvious way to achieve this, 
that is running multiple instances in a single box with clustering turned on.

Original comment by anti...@gmail.com on 23 Aug 2010 at 3:46

GoogleCodeExporter commented 8 years ago
@antirez, if many clients are connecting to the same machine and each request 
is doing sorting/ inter sections of data etc. then each request needs to wait 
till the other one has finished.. 
Isn't it easy to implement something like => if the slaveof command is 
localhost 127.0.0.1 & the port is the same, start the instance in "threaded" 
mode. Using the same shared memory/ db files. 
I can understand that redis-cluster is probably the best approach but this a 
much larger & much more difficult project then what I'm suggesting & can *I 
hope* more easily be done. O:-)

Original comment by jayme%ne...@gtempaccount.com on 22 Sep 2010 at 6:12

GoogleCodeExporter commented 8 years ago
Multi-process shared memory is not nearly as easy as you believe it to be.

Original comment by josiah.c...@gmail.com on 22 Sep 2010 at 6:33