Skip to content

CL-1: Add MySQL Router connection limits #82

Description

@szachovy

Problem

MySQL Router is bootstrapped with default settings. No max_connections limit means all MySQL server connections can be consumed by a single misbehaving client, starving cluster operations (health checks, replication, admin).

File: services/mysql-mgmt/docker_compose.yml

Fix

After mysqlrouter --bootstrap completes, inject connection limits into the generated mysqlrouter.conf:

sed -i 's/\[routing:bootstrap_rw\]/[routing:bootstrap_rw]\nmax_connections=40/' \
    /opt/default/mysql_router/mysqlrouter.conf

This reserves connections for cluster operations (replication, health checks, admin).

Acceptance Criteria

  • Post-bootstrap step injects max_connections=40 into routing:bootstrap_rw section of mysqlrouter.conf
  • Connections reserved for cluster operations (replication, health checks, admin)
  • Router restart handled if required

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions