Redis clients to connect
Redis connected to receive from a client through a TCP listening port or Unix socket manner, when a connection is established, some of the internal operations Redis performs the following:
- First, the client socket will be set to non-blocking mode, because Redis used in the event processing network is non-blocking multiplex model.
- TCP_NODELAY then set the property to the socket, disabling the Nagle algorithm
- Then create a readable file for listening to this event the client socket data transmission
Maximum number of connections
In Redis2.4, the maximum number of connections are hard-coded in the code directly inside, while version 2.6 this value becomes configurable.
Maxclients default value is 10000, you can modify this value in redis.conf in.
config get maxclients
1) "maxclients"
2) "10000"
Examples
The following example we set when the service starts 100000 maximum number of connections:
redis-server --maxclients 100000
Client command
S.N. | command | description |
---|---|---|
1 | CLIENT LIST | Returns a list of clients connected to redis services |
2 | CLIENT SETNAME | Sets the name of the current connection |
3 | CLIENT GETNAME | Access to services by name CLIENT SETNAME command set |
4 | CUSTOMER BREAK | Suspend client connections, the designated suspend time in milliseconds |
5 | CLIENT KILL | Close the client connection |