# #redis客户端连接数
# #redis通过监听一个TCP端口或socket的方式接收来自客户端的连接, when a connection is made to a client, the following is done internally by Redis: (1) The client socket is set to non-blocking mode, Because Redis uses a non-blocking multiplexing model for network time processing, (2) then set the Tcp_nodelay property for the socket, disable the Nagle algorithm, and (3) Create a readable file event to listen to the data sent by the client socket.
# #redis最大连接数
# # (1.1) After 2.6 version, you can modify the maximum number of connections configuration, default 10000, can be modified in the redis.conf configuration file
... # maxclients 10000 ...
# # (1.2) Add parameter--maxclients 100000来 set maximum connection limit when starting Redis.service service
Redis-server--maxclients 100000-f/etc/redis.conf
# #命令行查看 & Modified Redis maximum number of connections
127.0.0.1:6379> CONFIG GET maxclients # #1) "MaxClients" # #2) "10000" 127.0.0.1:6379>
# #redis-CLI Command control line to get the client information command
The client list gets the lists of clients
CLIENT SETNAME Setting the name of the current connection point Redis
CLIENT GETNAME View the name of the current connection
CLIENT kill Ip:port kills the specified connection
CLIENT LIST ##id=3 addr=127.0.0.1:36588 fd=5 name= age=7 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=327 Obl=0 oll=0 omem=0 events=r cmd=clientclient SETNAME js # #OKCLIENT LIST # #id =3 addr=127.0.0.1:36588 fd=5 name=js age=37 idle=0 flags=n db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r Cmd=clientCLIENT GETNA ME # # "JS" CLIENT KILL ID 3 # # (integer) 0
Redis Client connection, maximum number of connections query and settings