Fast Forward Traffic Observer (FFTO)
Availability
FFTO is a released build-time feature, not a feature present in every ProxySQL build. In the released
v3.0.10, v3.1.10, and v4.0.10 Makefiles, the tier/build matrix is:
- The v3.0.x Stable Tier is the default build; it leaves
PROXYSQLFFTOunset and does not include FFTO. - The v3.1.x Innovative Tier is enabled with
PROXYSQL31=1; this setsPROXYSQLFFTO=1and includes FFTO. - The v4.0.x Plugin Chassis Tier is enabled with
PROXYSQL40=1; this setsPROXYSQL31=1, which in turn setsPROXYSQLFFTO=1and includes FFTO.
An FFTO-capable build still starts with FFTO disabled for both protocols. Check that the installed build exposes the FFTO variables before enabling it.
How It Works
FFTO passively observes traffic from Fast Forward sessions and extracts query metadata without changing the traffic being forwarded. Observed data is recorded through the corresponding MySQL or PostgreSQL query-digest path.
Protocol Support
FFTO supports Fast Forward traffic for both MySQL and PostgreSQL in builds compiled with
PROXYSQLFFTO=1.
- MySQL: text queries and prepared-statement traffic.
- PostgreSQL: simple and extended query-protocol traffic, including pipelined queries.
Configuration Variables
FFTO behavior is controlled by the following global variables. The released initializers set both enablement
variables to false and both per-connection buffer limits to 1048576 bytes (1 MiB).
| Variable | Default | Description |
|---|---|---|
mysql-ffto_enabled | false | Enables FFTO for MySQL Fast Forward sessions. |
mysql-ffto_max_buffer_size | 1048576 | Maximum FFTO packet-capture buffer per MySQL connection, in bytes. |
pgsql-ffto_enabled | false | Enables FFTO for PostgreSQL Fast Forward sessions. |
pgsql-ffto_max_buffer_size | 1048576 | Maximum FFTO packet-capture buffer per PostgreSQL connection, in bytes. |
Metrics Captured
FFTO feeds observed traffic into the standard query-digest statistics:
stats_mysql_query_digestfor MySQLstats_pgsql_query_digestfor PostgreSQL
The captured data includes normalized query information, execution latency, row counts, error information, and execution counts where the observed protocol traffic provides them.
Performance and Degradation Behavior
FFTO uses a bounded per-connection capture buffer. If the configured buffer limit is reached, ProxySQL stops observing that connection rather than allowing observation to consume unbounded memory. The Fast Forward traffic continues; only FFTO observability is degraded for that connection.
Enabling and Verifying FFTO
Enable each protocol independently in global_variables, then load the corresponding variables to runtime:
UPDATE global_variables
SET variable_value='true'
WHERE variable_name='mysql-ffto_enabled';
LOAD MYSQL VARIABLES TO RUNTIME;
SAVE MYSQL VARIABLES TO DISK;
UPDATE global_variables
SET variable_value='true'
WHERE variable_name='pgsql-ffto_enabled';
LOAD PGSQL VARIABLES TO RUNTIME;
SAVE PGSQL VARIABLES TO DISK;
Verify the runtime settings before generating Fast Forward traffic:
SELECT variable_name, variable_value
FROM runtime_global_variables
WHERE variable_name IN ('mysql-ffto_enabled', 'pgsql-ffto_enabled');
After sending Fast Forward traffic, inspect stats_mysql_query_digest or stats_pgsql_query_digest for the
observed query digests.
Limitations
- FFTO is unavailable in builds that do not compile with
PROXYSQLFFTO=1. - It is disabled by default, even in an FFTO-capable build.
- If a capture buffer reaches its limit, ProxySQL continues forwarding traffic but stops FFTO observation for that connection.