Redis Client Connections

Source: Internet
Author: User
Tags redis socket

Redis receives a connection from a client by listening to a TCP port or a UNIX socket, and when a connection is established, the following actions are performed within Redis:

• First, the client socket is set to non-blocking mode because Redis uses a non-blocking multiplexing model for network event processing.

• Then set the Tcp_nodelay property for this socket and disable the Nagle algorithm.

• Then create a readable file event to listen to the data sent by this client socket.


Maximum number of connections

In Redis2.4, the maximum number of connections is directly hardcoded in the code, and in version 2.6 this value becomes configurable.

The default value for MaxClients is 10000, and you can modify the value in redis.conf.

Config get maxclients

1) "MaxClients"
2) "10000"

Example

The following example sets the maximum number of connections to 10000 when the service starts:

Redis-server--maxclients 100000
Client commands


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.