Redis Client connection, maximum number of connections query and settings

Source: Internet
Author: User

# #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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.