Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Client Connection

Redis Client Connection

Redis accepts client connections by listening on a TCP port or a Unix socket. When a connection is established, Redis performs the following internal operations:


Maximum Connections

In Redis 2.4, the maximum number of connections was hardcoded directly in the code, while in version 2.6 this value became configurable.

The default value of maxclients is 10000, and you can also modify this value in redis.conf.



config get maxclients



1) "maxclients"

2) "10000"

Example

In the following example we set the maximum number of connections to 100000 when starting the service:



redis-server --maxclients 100000


Client Commands

S.N. Command Description
1 CLIENT LIST Returns the list of clients connected to the redis service
2 CLIENT SETNAME Set the name of the current connection
3 CLIENT GETNAME Get the service name set via the CLIENT SETNAME command
4 CLIENT PAUSE Suspend the client connection, specifying the suspension time in milliseconds
5 CLIENT KILL Close the client connection