3 ms·
Redis won't function till it has loaded all data from disk to memory. So if your webapp doesn't have too much data then possibly. Also since Redis is memory ba
by immad 9y ago
Redis won't function till it has loaded all data from disk to memory. So if your webapp doesn't have too much data then possibly.
Also since Redis is memory backed you need more RAM then data. This can get very costly.
Another annoyance is that Redis is single process single threaded so you really have to avoid running long running queries unless you do extensive manual sharding.
(Disclaimer: it's been a few years since I had to think about these constraints so maybe some are removed in more recent versions of Redis)
- yaaminu 9y agoRedis can now be multi threaded in custom modules
- dvirsky 9y agoSort of - the model it supports is not really multi-threaded. The modules can spawn threads, and acquire a "GIL" when they want to touch actual Redis data - thus only one thread at a time actually "owns" the entire Redis instance. This allows long running queries to do primitive cooperative multi-tasking, releasing the GIL and letting other queries have a chance; But there is no real parallel data access. You will only gain real parallelism if you have actual work to do that does not touch the data directly when a thread is not touching the GIL. There aren't many cases that this applies to - usually copying the data aside to do work on it is not worth the gain of parallelism.