Understanding MaxScale's Read/Write Split Router
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: Read/Write Split Router
Topics on this page:
MaxScale's Read/Write Split Router (readwritesplit) performs query-based load balancing. For each client connected to MaxScale, it opens up connections to multiple back-end database servers. When the client sends a write query to MaxScale, it routes the query to the connection opened with the primary server. When the client sends a read query to MaxScale, it routes the query to a connection opened with one of the replicas.
What Does the Read/Write Split Router Support?
The Read/Write Split Router (readwritesplit) supports:
MariaDB ReplicationMariaDB Replication deployments
Galera ClusterGalera Cluster deployments
Multi-Node Enterprise ColumnStoreMulti-Node Enterprise ColumnStore deployments
When to Use the Read/Write Split Router?
The Read/Write Split Router (readwritesplit) allows you to:
Perform query-based load balancing.
Route client connections to multiple servers simultaneously.
Route write queries to primary and read queries to replicas.
Automatically reconnect clients to the new primary after failover or switchover.
Automatically replay transactions on the new primary after failover or switchover.
Automatically retry failed queries.
Enforce causal reads to avoid reading stale data caused by slave lag.
Deploying Read/Write Split Router
Deploy ColumnStore Object Storage TopologyDeploy ColumnStore Object Storage Topology
Deploy ColumnStore Shared Local Storage TopologyDeploy ColumnStore Shared Local Storage Topology
Deploy Galera Cluster TopologyDeploy Galera Cluster Topology
Deploy Primary/Replica TopologyDeploy Primary/Replica Topology
Deploy MaxScale with MariaDB Monitor and Read/Write Split Router
Deploy MaxScale with Galera Monitor and Read/Write Split Router