In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares to you is about the configuration of redis connections. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Let's take a look at it with the editor.
Number of redis client connections
Redis receives connections from clients by listening on a TCP port or socket
When a connection is established with the client, the following actions are done internally in redis:
(1) the client socket will be set to non-blocking mode, because redis uses a non-blocking multiplexing model in network time processing.
(2) then set the TCP_NODELAY property for the socket and disable the Nagle algorithm
(3) then create a readable file event to listen to the data transmission of this client socket.
Number of redis connections and maximum connections
1. Number of connections View
Method 1: use: info clients on the redis-cli command line to view the current number of redis connections
127.0.0.1 6379 > info clients#Clientsconnected_clients:621client_longest_output_list:0client_biggest_input_buf:0blocked_clients:0127.0.0.1:6379 >
Method 2:config get maxclients can query the maximum number of connections allowed by redis
127.0.0.1 6379 > CONFIG GET maxclients # # 1) "maxclients" # # 2) "10000" 127.0.0.1 purl 6379 >
two。 Set, modify
1. After version 2.6, you can modify the maximum number of connections configuration. The default is 10000, which can be modified in the redis.conf configuration file.
... # maxclients 10000...2.config set maxclients num can set the maximum number of connections allowed by redis 127.0.0.1 CONFIG set maxclients 10OK127.0.0.1:6379 6379 >
3. Add the parameter-- maxclients 100000 to set the maximum number of connections when starting the redis.service service
Redis-server-- maxclients 100000-f / etc/redis.conf is the configuration of the number of redis connections. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.