Skip to content

Commit b9d5ce8

Browse files
szachovyCopilot
andcommitted
Add MySQL Router connection limit on bootstrap_rw
Inject max_connections=40 into the routing:bootstrap_rw section of the generated mysqlrouter.conf after bootstrap. Prevents a single misbehaving client from consuming all MySQL server connections and starving cluster operations (health checks, replication, admin). Closes #82 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ab8ce7 commit b9d5ce8

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
* Dependabot updates for `github-actions` and `terraform` ecosystems. (#29)
1616
* CI workflow to build and push service images to GitHub Container Registry on master merge. (#97)
1717
* Pull-first with local build fallback for container images during deployment. (#97)
18+
* MySQL Router max_connections=40 on bootstrap_rw to reserve connections for cluster operations. (#82)
1819

1920
### Changed
2021

services/mysql-mgmt/docker_compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ services:
7171
"/opt/default/mysql_router_certificate.pem" \
7272
--client-ssl-key \
7373
"/opt/default/mysql_router_key.pem"
74+
sed -i 's/\[routing:bootstrap_rw\]/[routing:bootstrap_rw]\nmax_connections=40/' \
75+
/opt/default/mysql_router/mysqlrouter.conf
7476
mysqlsh \
7577
--login-path="${PRIMARY_MYSQL_NODE}" --sql \
7678
--execute="DROP USER 'superset'@'$(mysqlsh --python --execute "exec(open('/opt/interfaces.py').read())")';"

0 commit comments

Comments
 (0)