MaxScale 25.01 Mirror
The mirror router is designed for data consistency and database behavior
verification during system upgrades. It allows statement duplication to multiple
servers in a manner similar to that of the with exporting of collected query metrics.
For each executed query the router exports a JSON object that describes the
query results and has the following fields:
The objects in the results array describe an individual query result and have
the following fields:
The main target from which results are returned to the client. This is a
mandatory parameter and must define one of the targets configured in thetargets parameter of the service.
If the connection to the main target cannot be created or is lost mid-session,
the client connection will be closed. Connection failures to other targets are
not fatal errors and any open connections to them will be closed. The router
does not create new connections after the initial connections are created.
The exporter where the data is exported. This is a mandatory parameter. Possible
values are:
Exports metrics to MaxScale log on INFO level. No configuration parameters.
Default: No default value
The output file where the metrics will be written. The file must be writable by
the user that is running MaxScale, usually the maxscale user.
When the file parameter is altered at runtime, the old file is closed before
the new file is opened. This makes it a convenient way of rotating the file
where the metrics are exported. Note that the file name alteration must change
the value for it to take effect.
This is a mandatory parameter when configured with exporter=file.
Default: No default value
The Kafka broker list. Must be given as a comma-separated list of broker hosts
with optional ports in host:port format.
This is a mandatory parameter when configured with exporter=kafka.
Default: No default value
The kafka topic where the metrics are sent.
This is a mandatory parameter when configured with exporter=kafka.
What to do when a backend network connection fails. Accepted values are:
Ignore the failing backend if it's not the backend that the main parameter
points to.
This parameter was added in MaxScale 6.0. Older versions always ignored
failing backends.
When to report the result of the queries. Accepted values are:
Always report the result for all queries.
This parameter was added in MaxScale 6.0. Older versions always reported the
result.
Example Configuration
Broken network connections are not recreated.
Prepared statements are not supported.
Contents of non-SQL statements are not added to the exported metrics.
This page is licensed: CC BY-SA / Gnu FDL