Redis Client Details by IP Test
The Redis Client Details test alerts you if any client has an input/query buffer that is in excess of 1GB, if the output buffer of any client is improperly sized, or if the output list of any client is long. To know which client has these abnormal qualities, use the Redis Client Details by IP test. This test automatically discovers the IP addresses of clients connected to Redis, and reports the input/query buffer usage, output buffer usage, and the length of the output buffer list of every client. In the process, the test points you to the exact client that is using the query buffer and/or output buffer memory excessively.
Target of the test : A Redis server
Agent deploying the test : An internal agent (recommended)
Outputs of the test : One set of results for each client that is connected to the Redis server
Parameters | Description |
---|---|
Test period |
How often should the test be executed |
Host |
The host for which the test is to be configured. |
Port |
The port at which the specified HOST listens. |
Redis Password and Confirm Password |
In some high security environments, a password may have been set for the Redis server, so as to protect it from unauthorized accesses/abuse. If such a password has been set for the monitored Redis server, then specify that password against REDIS PASSWORD. Then, confirm the password by retyping it against CONFIRM PASSWORD. If the Redis server is not password protected, then do not disturb the default setting of this parameter. To determine whether/not the target Redis server is password-protected, do the following:
|
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Client ID |
Indicates the client ID |
|
|
IP address |
Reports the IP address of this client. |
|
|
Port |
Indicates the port at which this client listens. |
Number |
|
Socket file descriptor entry |
Reports the socket file descriptor number of this client. |
Number |
|
Database ID |
Indicates the current database ID of this client. |
Number |
|
Age |
Indicates the total duration of this client's connection. |
Seconds |
|
Idle time |
Indicates the duration for which this client's connection was idle. |
Seconds |
By default recent versions of Redis don't close the connection with the client if the client is idle for many seconds: the connection will remain open forever. However, there are two conditions when it makes sense to set a timeout:
You can configure a timeout value via redis.conf or simply using CONFIG SET timeout <value>. |
Channel subscriptions |
Indicates the number of channels to which this client subscribes. |
Number |
Redis Pub/Sub implements the messaging system where the senders (in redis terminology called publishers) sends the messages while the receivers (subscribers) receive them. The link by which the messages are transferred is called channel. In Redis, a client can subscribe any number of channels. |
Pattern subscriptions |
Indicates the number of glob-style patterns this client subscribes to. |
Number |
The Redis Pub/Sub implementation supports pattern matching. Clients may subscribe to glob-style patterns in order to receive all the messages sent to channel names matching a given pattern. |
Query buffer length |
Indicates the length of the query buffer (in MB) of this client. |
MB |
If this measure reports the value 0, it means no queries are pending. Ideally, the value of this measure should be low. A high value or a consistent increase in this value could indicate the queries from the client are not being processed fast enough by the server. If the value of this measure reaches the hard limit of 1 GB, the client connection may close automatically. This is done to avoid a server crash in case of client or server software bugs. |
Query buffer free |
Indicates the amount of free space in the query buffer of this client. |
MB |
If this measure reports the value 0, it means that there is no free space in the query buffer. In this case, the client connection may close automatically. This is done to avoid a server crash in case of client or server software bugs. Ideally, a high value is desired for this measure. A steady drop in the value of this measure could imply that the query buffer is rapidly filling up. This could be because of a probable query processing bottleneck on the server. |
Output buffer length |
Indicates the length (in MB) of the output buffer of this client. |
MB |
Redis needs to handle a variable-length output buffer for every client, since a command can produce a big amount of data that needs to be transferred to the client. |
Output list length |
Indicates the number of responses enqueued in the output list of this client. |
Number |
If the output buffer is not correctly sized, then it can fill up quickly, causing subsequent responses to clients to be enqueued in an output list. If the value of this measure is abnormally high for a client, it means that the output list is very long; this in turn is a sign that the output buffer needs resizing. |
Output buffer memory |
Indicates the amount of output buffer memory used up by the responses to this client. |
MB |
Sometimes, a client may send more commands producing more output to serve at a faster rate at which Redis can send the existing output to the client. This is especially true with Pub/Sub clients in case a client is not able to process new messages fast enough. Both the conditions will cause the client output buffer to grow and consume more and more memory. In such a cases, this measure will report an abnormally high value. To limit the usage of output buffer memory, by default, Redis sets limits to the output buffer size for different kind of clients. When the limit is reached the client connection is closed and the event logged in the Redis log file. There are two kind of limits Redis uses:
Different kind of clients have different default limits:
It is possible to change the limit at runtime using the CONFIG SET command or in a permanent way using the Redis configuration file redis.conf. |