The connection queue contains pending connections to Kaspersky Scan Engine. By configuring the connection queue, you can influence the performance of Kaspersky Scan Engine in HTTP mode. This section explains how to configure the connection queue.
Three parameters allow you to configure the connection queue: MaxHTTPSessionsNum
, MaxIncomingConnectionsNum
, and ThreadsCount
. These parameters can be set in the HTTP mode configuration file.
MaxHTTPSessionsNum
This parameter specifies the maximum number of active TCP connections that Kaspersky Scan Engine can maintain simultaneously. When a TCP connection with a client closes, Kaspersky Scan Engine can accept another connection in its place.
MaxIncomingConnectionsNum
This parameter specifies the maximum number of pending TCP connections to Kaspersky Scan Engine. If the number of pending connections reaches MaxIncomingConnectionsNum
, additional connections may be dropped.
ThreadsCount
This parameter specifies the maximum number of simultaneously running scan threads. When a scan thread completes a scanning task, it picks up another one from the scan queue.
Examples of the connection queue configuration
These examples show how you can use the connection queue to influence the behavior of Kaspersky Scan Engine.
Consider the following example: the value of MaxIncomingConnectionsNum
is 16
, the value of ThreadsCount
is 16
, and the value of MaxHTTPSessionsNum
is 50
. In this example, Kaspersky Scan Engine can accept only 16
connections at a time, but because MaxHTTPSessionsNum
is 50
, their scan tasks are accepted immediately. Additional connections may be dropped. Sixteen scan threads is usually enough to process scan tasks from 16 clients quickly, so the scan queue will be short.
Consider the following example: the value of MaxIncomingConnectionsNum
is 100
, the value of ThreadsCount
is 16
, and the value of MaxHTTPSessionsNum
is 50
. In this example, Kaspersky Scan Engine can accept 50
connections at a time. Kaspersky Scan Engine starts processing scan tasks from some of these clients in 16
scan threads, and the rest of the scan tasks form the scan queue. Other pending connections form the connection queue and wait to be accepted. Additional connections may be dropped.