Description:
In an InnoDB Cluster + MySQL Router 8.4.7 deployment, I observed an inconsistency between the Router configuration stored in InnoDB Cluster metadata and the configuration value printed by MySQL Router at startup.
From the metadata side, the router entry in mysql_innodb_cluster_metadata.routers clearly contains "max_total_connections": 1000 inside the JSON attributes.
However, on Router startup, mysqlrouter.log prints the “New router options read from the metadata” JSON where "max_total_connections" is shown as 512 instead of 1000.
This creates operational confusion (metadata vs runtime/logging mismatch) and may also have functional impact if Router actually enforces 512 as the total connection cap, potentially leading to connection starvation during traffic spikes.
I will attach:
- the Router config file used,
- the SQL output showing the metadata value 1000,
- the log excerpt showing 512.
How to repeat:
1、Deploy InnoDB Cluster 8.4.7 and bootstrap MySQL Router 8.4.7 against the cluster metadata.
2、Ensure the router metadata contains "max_total_connections": 1000 (as shown below).
3、Start / restart MySQL Router and inspect mysqlrouter.log.
## Metadata verification (server side)
SELECT * FROM mysql_innodb_cluster_metadata.routers\G
In my case, the attributes JSON contains:
"max_total_connections": 1000
## Router side log observation
Start/restart Router and check mysqlrouter.log for the line similar to:
New router options read from the metadata ... "max_total_connections": 512 ...
## Expected Result
When the metadata entry contains "max_total_connections": 1000, MySQL Router should:
log "max_total_connections": 1000 when reading options from metadata, and
(if applicable) enforce the configured value consistently.
## Actual Result
Metadata shows:
"max_total_connections": 1000
Router startup log shows:
"max_total_connections": 512
This is a direct inconsistency between the stored metadata configuration and the Router-reported configuration.
## Impact
At minimum: misleading / inconsistent configuration observability (metadata vs Router log differs).
Potentially: Router may clamp/override the value and limit total connections to 512, which can cause connection acquisition failures under load (connection pool timeouts / bursts).
Suggested fix:
1、Honor the metadata value exactly: When max_total_connections is stored as 1000 in InnoDB Cluster metadata, Router should use 1000 as the effective value, unless there is a documented hard limit or safety clamp.
2、If clamping is intended, make it explicit: If Router must clamp max_total_connections (e.g., due to internal constraints), it should (a) log both the configured value and the effective value, and (b) log the reason and source of the clamp.
3、Ensure consistent logging vs runtime: The JSON printed in “New router options read from the metadata” should reflect the same value Router actually uses at runtime, to avoid misleading operators.