The Runtime API enables real-time adjustments to settings without any downtime or the need to restart or reload the HAProxy service.

However, be aware of the following issue: if you disable a frontend or backend server, those changes will not be saved and will revert upon the next restart of HAProxy. If you check the Save changes box, the modifications will be saved, but they will not appear in the configuration files. This may lead to difficulties in debugging or cause confusion.

Save changes checkbox

Use the interface that is compatible with the HAProxy Runtime API to avoid these issues. This interface allows you to edit the runtime configuration and save changes to the configuration file without any downtime.

icon
Any changes made on the master server will also take effect on the slave server.
Short instrauction

To execute various commands through the Runtime API:

Actual commands for HAProxy v2

Action & Keyword Description
prompt Toggle interactive mode on or off
quit Disconnect from the session
show tls-keys [id|*] Display TLS key references or remove TLS ticket keys when an ID is specified
set ssl tls-key [id|keyfile] tlskey Set the next TLS key for the specified id or keyfile listener to tlskey
show sess [id] Report the list of current sessions or dump the specified session
shutdown session Kill a specific session
shutdown sessions server Kill all sessions on a specified server
clear counters Reset maximum statistics counters (add 'all' to clear all counters)
show info Display information about the running process
show stat Report counters for each proxy and server
show schema json Display the schema used for statistics
disable agent Disable agent checks (use 'set server' instead)
disable health Disable health checks (use 'set server' instead)
disable server Disable a server for maintenance (use 'set server' instead)
enable agent Enable agent checks (use 'set server' instead)
enable health Enable health checks (use 'set server' instead)
enable server Enable a previously disabled server (use 'set server' instead)
set maxconn server Change the frontend's maxconn setting
set server Change a server's state, weight, or address
get weight Report the current server's weight
set weight Change a server's weight (deprecated)
show resolvers [id] Dump counters from all resolvers in the section
associated name servers clear table Remove an entry from the table
set table [id] Update or create an entry in the table
show table [id] Report table usage statistics or dump the contents of the specified table
show peers [peers section] Dump information about all peers or the specified peers section
disable frontend Temporarily disable a specific frontend
enable frontend Re-enable a specific frontend
set maxconn frontend Change a frontend's maxconn setting
show servers state [id] Dump volatile server information for the specified backend id)
show backend List backends in the current running configuration
shutdown frontend Stop a specific frontend
set dynamic-cookie-key backend Change the secret key for dynamic cookies on a specified backend
enable dynamic-cookie backend Enable dynamic cookies on a specific backend
disable dynamic-cookie backend Disable dynamic cookies on a specific backend
show errors Report the last request and response errors for each proxy
set maxconn global Change the per-process maxconn setting
set rate-limit Change the rate limiting value
set severity-output [none|number|string] Set the presence of severity levels in feedback information
set timeout Change a timeout setting
show env [var] Dump environment variables known to the process
show cli sockets Dump list of CLI sockets
show cli level Display the level of the current CLI session
show fd [num] Dump the list of file descriptors currently in use
show activity Show per-thread activity statistics (for support/developers)
operator Lower the level of the current CLI session to operator
user Lower the level of the current CLI session to user
show startup-logs Report logs emitted during HAProxy startup
show cache Display the current cache status
add acl Add an ACL entry
clear acl Clear the contents of the specified ACL
del acl Delete an ACL entry
get acl Report the patterns matching a sample for a specified ACL
show acl [id] Report available ACLs or dump the contents of a specified ACL
add map Add a map entry
clear map id Clear the contents of the specified map
del map Delete a map entry
get map Report the keys and values matching a sample for a specified map
set map Modify an existing map entry
show map [id] Report available maps or dump the contents of a specified map
show pools Report information about memory pool usage
show profiling Display CPU profiling options
set profiling Enable/disable CPU profiling
show threads Display debugging information for some threads

Maxconn is a configuration parameter used in load balancers and proxy servers, such as HAProxy, to specify the maximum number of concurrent connections that a server or frontend can handle at any given time. With Roxy-WI, you can easily adjust this setting through the web interface in the HAProxy => Runtime API => Change Maxconn section.

You can configure the Maxconn settings for Global, Frontends, and Backends.

To do this, select the desired server and, if necessary, the specific frontend or backend. Enter the required value in the "Maxconn" field and click Enter.

Any positive value, including zero, is permissible. However, setting a value higher than the global maxconn for frontend and backend is not practical.

Change maxconn

HTTP requests are stateless by design, which raises questions about how to track user activities, including potentially malicious ones. Effective tracking is essential for collecting metrics, blocking users, and making decisions based on user behavior. To monitor user activities between requests, a mechanism for storing and categorizing events — such as by client IP address or other key metrics — is necessary.

HAProxy provides a fast in-memory storage solution known as stick tables, which facilitates this tracking. Additionally, Roxy-WI offers a user-friendly GUI for managing these stick tables.

To view and manage stick tables, go to the HAProxy => Runtime API => Stick Table section, select the server, choose a table, and click Get table. This will display the current entries and their associated metrics.

Stick table