J
J
jshapen2018-09-02 12:27:35
Redis
jshapen, 2018-09-02 12:27:35

How does Redis work when accessed by multiple clients at the same time?

The first client (local) writes a string of 50 bytes to the radish list 20 times per second.
Let's say we got 200,000 lines = 10 megabytes
The second client tries to get the first 100,000 lines.
Transferring over the Internet will take some time.
What happens to the first client at this time?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2018-09-03
@jshapen

As already mentioned - Redis is single-threaded, that is, requests will be executed in turn. Until it generates data for the second client, the request of the first one will not be executed. But it should be understood that the performance of Redis is very high. So much so that in the case of 2 clients, one of which writes something to the database 20 times per second, you simply will not notice the delay. The normal load for Redis is tens and hundreds of thousands of requests per second, or even millions.

S
Sergey Tikhonov, 2018-09-02
@tumbler

Redis is single threaded. While the first request is being processed, it accepts requests from other clients and queues them for processing. Therefore, it is not recommended to perform KEYS * on a server with a million keys.

#
#, 2018-09-03
@mindtester

if the project is still under development, maybe take a look at aerospike ? there is a community (free) edition of
ps a picture to attract attention
ps there is also ArangoDB , also optimized for in-memory by default, multi-threaded, and goodies in general a wagon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question