YouTip LogoYouTip

Redis Client Connection

# Redis Client Connection Redis accepts client connections by listening on a TCP port or a Unix socket. Once a connection is established, Redis performs the following internal operations: * First, the client socket is set to non-blocking mode, because Redis uses a non-blocking multiplexing model for network event handling. * Then, the TCP_NODELAY option is set on this socket to disable Nagle's algorithm. * Finally, a readable file event is created to monitor data transmission from this client socket. * * * ## Maximum Number of Connections In Redis 2.4, the maximum number of connections was hardcoded directly into the source code; in version 2.6, this value became configurable. The default value of `maxclients` is 10000, which can also be modified in the `redis.conf` file. config get maxclients 1) "maxclients"2) "10000" ### Example In the following example, we set the maximum number of connections to 100000 when starting the Redis server: redis-server --maxclients 100000 * * * ## Client Commands | S.N. | Command | Description | | --- | --- | --- | | 1 | **CLIENT LIST** | Returns a list of clients connected to the Redis server | | 2 | **CLIENT SETNAME** | Sets the name for the current connection | | 3 | **CLIENT GETNAME** | Retrieves the name set by the CLIENT SETNAME command | | 4 | **CLIENT PAUSE** | Suspends client connections for a specified duration in milliseconds | | 5 | **CLIENT KILL** | Closes a client connection |
← Server Command GetkeysRedis Benchmarks β†’