Global configuration
The [global] section contains server-wide settings that apply to all servers and services in your Quark configuration. This section is optional—if not specified, default values are used.
Parameters
Section titled “Parameters”backlog
Section titled “backlog”- Type:
Integer - Required: No
- Default:
4096 - Description: Maximum number of pending connections the server can queue. This determines how many connection requests can wait while the server is busy processing other requests.
max_connections
Section titled “max_connections”- Type:
Integer - Required: No
- Default:
1024 - Description: Maximum number of simultaneous client connections allowed across all servers. Once this limit is reached, new connection attempts will be rejected until existing connections are closed.
max_requests
Section titled “max_requests”- Type:
Integer - Required: No
- Default:
100 - Description: Maximum number of simultaneous HTTP requests the server can process. This limits concurrent request handling to prevent resource exhaustion.
keepalive
Section titled “keepalive”- Type:
Boolean - Required: No
- Default:
true - Description: Enable or disable HTTP keep-alive connections. When enabled, connections remain open between requests, reducing latency and improving performance for clients making multiple requests.
keepalive_timeout
Section titled “keepalive_timeout”- Type:
Integer - Required: No
- Default:
60 - Description:Timeout in seconds for HTTP keep-alive connections. After this period of inactivity, the connection will be closed. Only applies when
keepaliveis enabled.
keepalive_interval
Section titled “keepalive_interval”- Type:
Integer - Required: No
- Default:
20 - Description: Interval in seconds between HTTP keep-alive probes. The server sends probes to detect if the client is still connected. Only applies when
keepaliveis enabled.
tls_handshake_timeout
Section titled “tls_handshake_timeout”- Type:
Integer - Required: No
- Default:
10 - Description: Timeout in seconds for TLS handshake. If the TLS handshake doesn’t complete within this time, the connection will be terminated.
http_header_timeout
Section titled “http_header_timeout”- Type:
Integer - Required: No
- Default:
30 - Description: Timeout in seconds for reading HTTP headers. If the client doesn’t send complete HTTP headers within this time, the connection will be terminated.
idle_timeout
Section titled “idle_timeout”- Type:
Integer - Required: No
- Default:
300 - Description: Timeout in seconds for idle connections. Connections that remain idle (no data sent or received) for longer than this duration will be automatically closed.
idle_check_interval
Section titled “idle_check_interval”- Type:
Integer - Required: No
- Default:
20 - Description: Interval in seconds between checks for idle connections. The server periodically checks for idle connections at this interval and closes those that have exceeded the
idle_timeout.
max_conn_per_ip
Section titled “max_conn_per_ip”- Type:
Integer - Required: No
- Default:
None(no limit) - Description: Maximum number of simultaneous connections allowed from a single IP address. When set, this limits how many concurrent connections a single client can maintain, providing basic rate limiting and DoS protection.
Example
Section titled “Example”Basic global configuration:
[global]backlog = 4096max_connections = 1024max_requests = 100max_conn_per_ip = 10tls_handshake_timeout = 10http_header_timeout = 30idle_timeout = 180idle_check_interval = 15keepalive = truekeepalive_timeout = 60keepalive_interval = 20