I am planning to build a poll server for simple lists in Redis. Hundred and thousands of devices will poll every second to the Redis server to find small bits of information. These are mostly read calls. My question is what is the maximum concurrent requests the Redis server can accept?
Redis does serialize all operations because of its single-thread design. So at a given point in time, it can only handle one single operation (read or write).
On Redis, each CPU in your cluster can handle up to 200 new connections per second. Any additional connection attempts within the second will fail and users must try again.
Redis can handle up to 2^32 keys, and was tested in practice to handle at least 250 million keys per instance. Every hash, list, set, and sorted set, can hold 2^32 elements. In other words your limit is likely the available memory in your system.
RediSearch has a thread pool for running concurrent search queries. When a search request arrives, it gets to the handler, gets parsed on the main thread, and a request object is passed to the thread pool via a queue. The thread pool runs a query processing function in its own thread.
Maximum number of clients
In Redis 2.4 there was an hard-coded limit about the maximum number of clients that was possible to handle simultaneously.
In Redis 2.6 this limit is dynamic: by default is set to 10000 clients, unless otherwise stated by the maxmemory directive in Redis.conf.
However Redis checks with the kernel what is the maximum number of file descriptors that we are able to open (the soft limit is checked), if the limit is smaller than the maximum number of clients we want to handle, plus 32 (that is the number of file descriptors Redis reserves for internal uses), then the number of maximum clients is modified by Redis to match the amount of clients we are really able to handle under the current operating system limit.
You can check more on http://redis.io/topics/clients
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With