May 16, 2021 Redis
Redis receives connections from clients by listening to a TCP port or Unix socket, and when a connection is established, Redis does the following inside:
In Redis 2.4, the maximum number of connections is hardcoded directly into the code, and in version 2.6 the value becomes configurable.
The default value for maxclients is 10000, which you can also modify in redis.conf.
config get maxclients 1) "maxclients" 2) "10000"
Here are some examples where we set the maximum number of connections to 100,000 when the service starts:
redis-server --maxclients 100000
S.N. | Command | Describe |
---|---|---|
1 | CLIENT LIST | Returns a list of clients connected to the redis service |
2 | CLIENT SETNAME | Set the name of the current connection |
3 | CLIENT GETNAME | Gets the name of the service set up by the CLIENT SETNAME command |
4 | CLIENT PAUSE | Suspend the client connection, specifying the time to suspend in milliseconds |
5 | CLIENT KILL | Close the client connection |