Free audit

View Audit Scope
MySQL Router 8.4Port 6450 read-write splitting, connection sharing, and metadata cache

MySQL Router Consulting & Read-Write Splitting

JusDB designs, tunes, and operates MySQL Router 8.0 and 8.4 LTS connection routing topologies, configuring port 6450 transparent read-write splitting, ports 6446/6447 primary and secondary listeners, connection sharing (multiplexing), sub-second metadata-cache refresh, and InnoDB ClusterSet disaster recovery routing under your service agreement.

The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance.

  • NDA before access
  • Read-only by default
  • Written scope before work starts

mysqlrouter · port & metadata status

Inspect Router listeners

MySQL Router 8.4 Native Read-Write Splitting

access_mode=auto · connection_sharing=1

Transparent classic-protocol listener that routes autocommit SELECTs and START TRANSACTION READ ONLY queries to secondaries while sending writes to the primary.

Requires protocol=classic, PRIMARY_AND_SECONDARY destination role, and session-compatible transaction boundaries.

Simulate Port 6450 routing

MySQL Router vs ProxySQL matrix in Section 3 below.

Routing endpoints engineered
Port 6450 (read-write split), Port 6446 (Primary R/W), Port 6447 (Secondary R/O), X-Protocol 6448/6449, and REST API :8081
Response SLA
15 mins for a critical (P1) routing or failover incident, 24/7
Cutover & pooling standard
Sub-second X-Protocol GR notifications with automatic stale socket severing and connection_sharing=1 multiplexing

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

Production failure modes

Why default MySQL Router configs cause failover write errors or bypass read scaling

Running mysqlrouter --bootstrap gets a listener up quickly, but default metadata-cache intervals, unsevered stale sockets, and ORM transaction habits frequently break failover recovery and read-write splitting in production.

Common MySQL Router failure modes, root causes, and JusDB engineering fixes
Failure modeWhat is usually happeningWhere we start
ERROR 1290 · super_read_onlyWrite errors continue for 5 to 15 seconds after primary failoverLoose metadata_cache TTL defaults and disabled close_connection_after_refresh leave existing pooled application connections pinned to the demoted, now read-only primary.Set ttl=0.5, enable use_gr_notifications=1 over X-Protocol so Group Replication pushes topology changes immediately, and set close_connection_after_refresh=1 to drain stale sockets.
Port 6450 bypassPort 6450 sends all SELECT queries to the primary instead of secondariesThe application ORM wraps every read inside an explicit START TRANSACTION / autocommit=0 block, or session state changes (SET @user_var, TEMPORARY TABLE, GET_LOCK) disable connection sharing.Inspect Router connection_sharing telemetry via REST API, configure ORM read-only transactions (START TRANSACTION READ ONLY) or autocommit=1 for reads, and remove session-pinning statements.
Read-after-write lagImmediate SELECT after an INSERT returns outdated secondary stateSecondaries apply certified Group Replication transactions asynchronously under default EVENTUAL consistency, so a follow-up SELECT on port 6450 or 6447 hits a secondary before its applier queue drains.Configure session-level group_replication_consistency = BEFORE on critical read-after-write flows or route latency-sensitive transactional reads explicitly through primary port 6446.
Too many open filesMySQL Router drops new connections during Kubernetes pod scale-outDefault systemd LimitNOFILE (1024 or 4096) and uncalibrated max_total_connections saturate when hundreds of application pods open unshared TCP connections.Enable MySQL 8.4 connection_sharing=1 with tuned connection_sharing_delay, raise systemd LimitNOFILE=65535, and deploy Router as a co-located Kubernetes sidecar or local host daemon.
ClusterSet DR blackholeRouter keeps targeting the old region after a ClusterSet switchoverRouter was bootstrapped against a single local cluster metadata seed rather than the ClusterSet topology with target_cluster=primary.Re-bootstrap Router against the ClusterSet metadata schema with target_cluster=primary and invalidated_cluster_policy=drop_all so DR switchovers automatically redirect traffic.
TLS handshake CPU spikeHigh CPU usage on Router and MySQL nodes under short-lived connectionsClient-to-Router and Router-to-Server TLS handshakes execute on every short-lived connection when connection multiplexing/sharing is disabled.Configure client_ssl_mode and server_ssl_mode with connection_sharing=1 so backend MySQL server TLS sessions remain warm and pooled across client requests.

Technical scope and workstreams

Six MySQL Router 8.4 engineering workstreams

We engineer every layer between your application connection pool and your MySQL InnoDB Cluster, ClusterSet, or ReplicaSet.

  • MySQL Router 8.4 port 6450 read-write splitting

    We configure and validate MySQL Router 8.4's native read-write splitting endpoint (port 6450, access_mode=auto) so applications use one port for reads and writes.

    • destinations=metadata-cache://.../default?role=PRIMARY_AND_SECONDARY wiring
    • Validation of autocommit, START TRANSACTION READ ONLY, and ORM compatibility

    Port 6450 · access_mode=auto · PRIMARY_AND_SECONDARY

    Inspect mysqlrouter.conf below
  • Sub-second metadata cache & X-Protocol notifications

    We calibrate metadata_cache TTLs and Group Replication X-Protocol notifications so Router reacts to primary elections and node expulsions in milliseconds.

    • ttl=0.5, auth_cache_ttl, and auth_cache_refresh_interval calibration
    • use_gr_notifications=1 over port 33060 and close_connection_after_refresh=1 socket draining

    metadata_cache · ttl=0.5 · use_gr_notifications=1

    Simulate failover cutover
  • Connection sharing & multiplexing (MySQL 8.4)

    We enable session-safe connection sharing across classic protocol clients so thousands of application threads multiplex over a bounded pool of backend server connections.

    • connection_sharing=1 and connection_sharing_delay tuning for high-concurrency microservices
    • Audit of session variables, prepared statements, and temporary tables that block sharing

    connection_sharing=1 · connection_sharing_delay · LimitNOFILE

  • Kubernetes sidecar vs HA Keepalived/VIP gateway pools

    We architect stateless MySQL Router placement either co-located on each application host/pod (localhost routing with zero extra network hop) or as a redundant HA gateway tier.

    • Kubernetes sidecar and DaemonSet patterns with liveness probes against Router REST API
    • Dedicated Router gateway pairs with Keepalived VRRP VIP or AWS NLB health checks

    K8s Sidecar · Localhost Socket · Keepalived VIP · AWS NLB

  • InnoDB ClusterSet multi-region routing policies

    We configure ClusterSet-aware routing so primary writes follow the active global primary cluster while regional read-only replicas serve local low-latency reads.

    • target_cluster=primary vs local read-replica cluster routing rules
    • invalidated_cluster_policy=drop_all fencing during emergency forcePrimaryCluster() DR events

    target_cluster=primary · invalidated_cluster_policy=drop_all

    Explore InnoDB Cluster consulting
  • REST API (:8081) health probes & Prometheus telemetry

    We enable and secure the MySQL Router REST API plugin to expose live route health, active client connections, and backend pool metrics to Prometheus and load balancers.

    • Authenticated /api/20190715/routes/{route}/status and /connections monitoring
    • Load balancer health check integration and Prometheus exporter dashboards

    rest_api · rest_routing · :8081/api/ · Prometheus

Routing layer decision matrix

MySQL Router 8.4 vs ProxySQL: Side-by-Side Architecture Comparison

Both MySQL Router 8.4 and ProxySQL route high-availability MySQL traffic, but they solve different architectural problems. Use this matrix to choose the right proxy for your stack.

Side-by-side comparison of MySQL Router 8.4 and ProxySQL
Routing dimensionMySQL Router 8.4 (Oracle Native)ProxySQL (SQL-Layer Proxy)
InnoDB Cluster & ClusterSet IntegrationFirst-party native integration; reads AdminAPI metadata and X-Protocol GR notifications directly.Monitors sys.gr_member_routing_candidate_status or read_only via SQL polling checks.
Read-Write Splitting MechanismPort 6450 (access_mode=auto in 8.4) + dedicated Port 6446 (R/W) and Port 6447 (R/O).Single port (6033) with regex, digest, user, or schema rules in mysql_query_rules.
Connection MultiplexingSupported in MySQL Router 8.4+ via connection_sharing=1 (auto-pauses on session state locks).Mature multiplexing engine with granular session variable tracking across thousands of pods.
Replica Lag QuarantineRelies on Group Replication Flow Control and group_replication_consistency levels.Native max_replication_lag hostgroup shunning for async, semi-sync, and Galera replicas.
Query Rewriting, Caching & FirewallNone (lightweight transparent packet forwarder and protocol router).Full SQL query rewriting, query result caching, query mirroring, and digest firewalling.
Operational Footprint & StateStateless single config file (mysqlrouter.conf); ideal as a 127.0.0.1 localhost app sidecar.Stateful SQLite admin database (proxysql.db) with runtime LOAD TO RUNTIME CLI.
Vector
JusDB
Cloud Native DefaultTraditional AgencyIn-House / DIY
Dynamic InnoDB Cluster Metadata Cache SynchronizationReal-time metadata polling and dynamic HTTP/REST cluster cache synchronization; automatically tracks primary promotions and replica quarantine states in sub-second cycles.Static DNS endpoints or cloud managed proxies that poll every 15–30 seconds, leading to stale routing windows during membership changes.Static HAProxy configuration requiring manual reload scripts on topology changes, causing socket drops and temporary routing black holes.Uncoordinated config files manually synchronized across application hosts, leading to configuration drift and traffic routed to dead nodes.
Transparent Read/Write Splitting on Distinct Ports (6446/6447)Native port separation (6446 RW classic, 6447 RO classic, 64460/64470 X Protocol) with round-robin secondary distribution and lag-aware read quarantine.Single generic endpoint requiring application-level ORM read/write splitting configuration and manual replica target weighting.Advises complex application-side database drivers with dual DataSource pooling, increasing connection churn and maintenance complexity.Applications route all queries (reads and writes) to the primary node, causing CPU saturation while expensive read replicas sit idle.
Sub-Second Primary Failover Re-routing with Client ResiliencySub-second TCP connection termination and redirection to newly elected Group Replication primary, with client reconnect backoff handling and transaction isolation.DNS TTL caching delays failover by 30–120 seconds; client libraries hang on stale TCP sockets until application socket timeout triggers.Manual VIP failover or load balancer reconfiguration taking 5–15 minutes, accompanied by connection storms and API timeouts.Application requests fail continuously with MySQL server has gone away errors until engineers manually intervene and update DNS.
Multi-Process Redundancy & TCP Connection PoolingCo-located Router sidecar architecture or highly available Router tiers behind keepalived/VRRP, with optimized thread pool sizing and file descriptor tuning.Single proxy instance per cluster or black-box managed proxy with rigid connection concurrency limits and hidden throttling.Single centralized proxy node representing a catastrophic single point of failure (SPOF) for all application database traffic.Direct unmanaged database connections hitting max_connections limits during traffic bursts, crashing the MySQL daemon.
TLS 1.3 End-to-End Encryption & Ephemeral HandshakesEnd-to-end TLS 1.3 configuration with ephemeral Diffie-Hellman keys, automated certificate rotation, mTLS client verification, and zero handshake latency penalty.Basic TLS terminated at cloud load balancer with unencrypted transit between proxy and backend DB instances inside VPC.Self-signed legacy TLS 1.1/1.2 certificates with manual renewal procedures that expire unexpectedly and halt production connectivity.Plaintext TCP connections over internal networks or disabled SSL verification flags (verify_server_cert=off) violating compliance mandates.
SLA Response Times & Senior DBRE EscalationNamed DBREs in a dedicated Slack war room, and proactive socket telemetry monitoring. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins.Cloud provider support tickets routed through automated tiers with 1–4 hour initial response time from non-database specialists.Business-hours-only ticket queue with 4–8 hour SLAs; proxy configuration changes treated as billable change requests.Application engineers forced to troubleshoot low-level proxy socket timeouts and network packet drops without deep DBRE expertise.

SLA response times for MySQL routing incidents

Coverage: 24/7

SeverityResponse SLARouting incident scopeCoverage & channel
P1 · Critical15 minsProduction database down, primary unreachable, data corruption risk, or active failover event.24/7 · Direct PagerDuty, Opsgenie, or phone page plus incident bridge
P2 · High30 minsSevere latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.24/7 · On-call alert plus shared Slack or Teams channel
P3 · Medium60 minsNon-critical slow query regression, staging issue, backup warning, configuration question, or planned operational request.24/7 · Shared Slack or Teams channel or support ticket

Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

Response means an on-call engineer is working the incident, not an automated reply.

Interactive routing and failover simulator

How MySQL Router 8.4 handles read-write splitting and failover

Select a state below to inspect how MySQL Router 8.4 splits reads and writes on port 6450, what breaks when metadata TTLs and socket draining are left at defaults, and how X-Protocol GR notifications achieve sub-second cutover.

mysqlrouter · Port 6450 & Metadata Cache State Machine

Inspect connection sharing, stale socket error storms, and X-Protocol notification cutover.

MySQL Router 8.4 (Ports 6450 / 6446 / 6447)

Applications connect to 127.0.0.1:6450. Router sends autocommit SELECTs and START TRANSACTION READ ONLY queries to mysql-az2/az3 while routing writes to mysql-az1.

840 Client -> 48 Server Conns
  • mysql-az1 (Primary)

    PRIMARY · R/W Target (Port 6450 writes & 6446)

    ONLINE · Pooled backend connections

  • mysql-az2 (Secondary)

    SECONDARY · R/O Target (Port 6450 reads & 6447)

    ONLINE · Round-robin active

  • mysql-az3 (Secondary)

    SECONDARY · R/O Target (Port 6450 reads & 6447)

    ONLINE · Round-robin active

With connection_sharing=1 and access_mode=auto on port 6450, 840 concurrent microservice connections share 48 backend MySQL server threads without exhausting max_connections.

How we deploy and validate a MySQL Router 8.4 fleet

  1. Pool Audit

    Inspect ORM transactions and session variables

    Verify autocommit behavior, START TRANSACTION READ ONLY support, and session state compatibility for port 6450 and connection sharing.

  2. Placement

    Design K8s sidecar or HA VIP gateway topology

    Architect 127.0.0.1 pod sidecar routing or redundant Keepalived/NLB Router gateways with systemd LimitNOFILE=65535.

  3. Hardening

    Configure ttl=0.5, GR notifications, and socket drain

    Enable use_gr_notifications=1, close_connection_after_refresh=1, connection_sharing=1, and REST API (:8081) health probes.

  4. Failover Test

    Verify sub-second primary cutover under load

    Run live primary crash and ClusterSet switchover drills to confirm zero lingering ERROR 1290 super_read_only write failures.

Representative deliverable

Production mysqlrouter.conf for port 6450 RW split and connection sharing

Every MySQL Router engagement delivers a production-hardened mysqlrouter.conf, systemd resource overrides, and REST API verification probes.

Sample finding: Cutting backend server threads by 82% while eliminating failover write errorsProduction deliverable

Routing & pooling finding

Unshared Kubernetes pod pools exhausted max_connections and wrote to demoted primaries

A fintech platform running 120 microservice pods against a 3-node MySQL 8.4 InnoDB Cluster regularly hit 3,600 open threads and suffered 12-second bursts of ERROR 1290 during rolling primary switches. Enabling port 6450 with connection_sharing=1, use_gr_notifications=1, and close_connection_after_refresh=1 reduced backend threads to 620 and cut failover recovery to 1.1s.

Backend MySQL threads3,600 → 620
Failover socket cutover1.1 seconds

1. Hardened MySQL Router 8.4 configuration with port 6450 RW split and X-Protocol push

/etc/mysqlrouter/mysqlrouter.conf

[DEFAULT]
max_total_connections               = 16384
io_threads                          = 8

[metadata_cache:prod_cluster]
cluster_type                        = gr
user                                = mysql_router_prod
metadata_cluster                    = prod_us_east
ttl                                 = 0.5
use_gr_notifications                = 1
close_connection_after_refresh      = 1

[routing:bootstrap_rw_split]
bind_address                        = 0.0.0.0
bind_port                           = 6450
destinations                        = metadata-cache://prod_cluster/default?role=PRIMARY_AND_SECONDARY
routing_strategy                    = round-robin
protocol                            = classic
access_mode                         = auto
connection_sharing                  = 1
connection_sharing_delay            = 1.0
client_ssl_mode                     = REQUIRED
server_ssl_mode                     = REQUIRED

[routing:bootstrap_ro]
bind_port                           = 6447
destinations                        = metadata-cache://prod_cluster/default?role=SECONDARY
routing_strategy                    = round-robin-with-fallback
disconnect_on_promoted_to_primary   = yes

2. Verify live connection sharing and destination health via REST API

Shell · Router REST API Health Probe

curl -s -u router_mon:$PASS \
  https://127.0.0.1:8081/api/20190715/routes/bootstrap_rw_split/status | jq .
# { "activeConnections": 840, "pooledConnections": 48, "blockedHosts": 0 }

Platforms and MySQL routing stacks we support

Ways to work together

How to engage JusDB for MySQL Router

Start with a read-only routing and failover socket audit, scope a fixed-deliverable MySQL Router 8.4 deployment, or place your routing and cluster tier under 24/7 operations.

Scoped Router deploymentThis page

Deploy MySQL Router 8.4 with port 6450 RW split.

A fixed-scope engagement to configure Kubernetes sidecars or HA gateway pools, enable connection sharing, and drill failover cutover.

Capabilities engineered end to end

  • Port 6450 Read-Write Split
  • Connection Sharing (8.4)
  • X-Protocol GR Push
  • K8s Sidecar / VIP Gateways
  • ClusterSet DR Routing
Free MySQL Router audit

Diagnose failover write errors and pool bottlenecks.

A read-only review of your mysqlrouter.conf, metadata-cache TTLs, ORM transaction boundaries, and Router vs ProxySQL fit.

What we inspect on your routing tier

  • metadata_cache TTL, use_gr_notifications, and socket draining
  • Port 6450 read-write split and connection_sharing=1 eligibility
  • Side-by-side comparison of MySQL Router 8.4 vs ProxySQL
Ongoing operations

24/7 on-call.

Continuous REST API route monitoring, rolling Router and Server upgrades, and 24/7 P1 incident response.

  1. Route alert24/7
  2. 15 minsP1 response SLA
  3. Written RCAafter every P1

For procurement and security

NDA first, read-only discovery, and rehearsed routing changes

Every mysqlrouter.conf update, port 6450 cutover, or connection-sharing rollout is tested against staging traffic first, executed with your engineers on the bridge, and backed by an instant rollback gate.Raguraman, Head of DBSRE · Allen D, Principal Engineer
  • Mutual NDA
  • Written statement of work
  • Named engineers
  • Least-privilege access
  • NDA before access

    Signed before any configuration or topology inspection. The scoping call needs no database credentials.

  • Written statement of work

    Router placement architecture, failover cutover criteria, coverage hours, and deliverables agreed in writing.

  • Least-privilege accounts

    Read-only metadata and REST API access through your bastion or VPN, with full session logging.

  • Runbooks you keep

    Every mysqlrouter.conf file, Kubernetes sidecar manifest, systemd unit, and health check script stays in your repository. Meet the JusDB team.

JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Read the stated status.

Technical FAQ

MySQL Router 8.4 and read-write splitting questions

Answers on port 6450 read-write splitting, ports 6446/6447, connection sharing, MySQL Router vs ProxySQL, and InnoDB Cluster failover.

Still have a question?

Ask it on a scoping call. No production access needed.

Book a 30-min scoping call (opens Google Calendar in a new tab)

How does native read-write splitting on port 6450 work in MySQL Router 8.4?

MySQL Router 8.4 introduces a unified read-write splitting listener on port 6450 configured with access_mode=auto, protocol=classic, connection_sharing=1, and a PRIMARY_AND_SECONDARY metadata-cache destination. When an application connects to port 6450, Router automatically sends read-only queries (autocommit SELECTs or statements inside START TRANSACTION READ ONLY) to secondary replicas while routing writes and explicit read-write transactions to the primary member.

What is the difference between MySQL Router ports 6446, 6447, 6448, 6449, and 6450?

By default, MySQL Router exposes port 6446 for classic MySQL protocol read-write traffic to the PRIMARY, port 6447 for classic MySQL protocol read-only traffic load-balanced across SECONDARY nodes, port 6448 for X-Protocol read-write traffic, port 6449 for X-Protocol read-only traffic, and port 6450 (in MySQL Router 8.4+) for transparent classic-protocol read-write splitting over a single port.

When should we choose MySQL Router 8.4 vs ProxySQL?

Choose MySQL Router 8.4 when running native MySQL InnoDB Cluster, InnoDB ClusterSet, or InnoDB ReplicaSet and you want a lightweight, stateless proxy that reads AdminAPI metadata and X-Protocol group notifications natively. Choose ProxySQL when you run custom Semi-Sync + Orchestrator or Galera topologies, or when you need advanced SQL layer features such as regex/digest query routing, query rewriting, query firewalling, or fine-grained max_replication_lag hostgroup shunning.

How do you stop applications from hitting super_read_only errors on a demoted primary during failover?

Stale write errors happen when MySQL Router either learns about a failover too slowly or leaves existing pooled TCP sockets connected to the old primary. We eliminate this by enabling use_gr_notifications=1 (so Group Replication pushes view changes immediately over X-Protocol), setting metadata_cache ttl=0.5, and enabling close_connection_after_refresh=1 so Router severs stale writer connections the instant a primary role changes.

How does connection sharing (multiplexing) work in MySQL Router 8.4?

When connection_sharing=1 is enabled on classic protocol routes and both client_ssl_mode and server_ssl_mode are active, MySQL Router multiplexes multiple idle client sessions onto a smaller pool of backend MySQL server connections after connection_sharing_delay expires. Router tracks session state automatically and temporarily disables sharing for a session only if the client creates temporary tables, acquires user locks, or modifies session variables that cannot be restored.

Should MySQL Router run on each application server (sidecar) or on dedicated proxy hosts?

Because MySQL Router is stateless and consumes minimal RAM/CPU, Oracle recommends co-locating Router on each application host or as a Kubernetes pod sidecar connecting over 127.0.0.1. Co-location eliminates an extra network hop and removes any central proxy single point of failure. When sidecar deployment is not possible (for example, serverless functions or legacy appliances), we deploy redundant Router gateway pairs behind Keepalived VIPs or an AWS Network Load Balancer.

What are your SLA response times for a production MySQL routing or failover incident?

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins. Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

Next step

Put a database engineer on your MySQL Router fleet this week

Share your mysqlrouter.conf, InnoDB Cluster topology, or ProxySQL vs Router questions. The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance, subject to availability: mutual NDA before read-only access, a prioritized report within one week after access is ready, and no obligation.

NDA before access · read-only by default · written scope first