Choosing a Router with MaxScale

MariaDB MaxScale is a database proxy that extends the high availability, scalability, and security of MariaDB Server while at the same time simplifying application development by decoupling it from underlying database infrastructure. It includes multiple routers that each support different use cases.

Router

Description

Read/Write Split Router

  • Performs query-based load balancing

  • Each client connected to MaxScale is mapped to multiple connections to different back-end database servers

  • Routes write queries to connection to primary server

  • Routes read queries to connection to replica server

Read Connection Router

  • Performs connection-based load balancing

  • Each client connected to MaxScale is mapped to one connection to a single back-end database server

  • Can be configured to route to primary servers, replica servers, or any server

Smart Router

  • Routes transactional queries to the transactional database

  • Routes analytical queries to the analytical database

Schema Router

  • Routes queries targeting different databases to different servers.

  • Builds a simple sharded database

Hint Router

  • Looks at the hints embedded in a packet buffer and attempts to route the packet according to the hint

  • Uses default actions for queries without hints

Binlog Router

  • Mitigates effect of primary failure in MariaDB Replication deployments by acting as a Binlog Server

  • Reduces bandwidth requirements of primary server in environments with many replica servers

Kafka CDC Router

  • Replicates from MariaDB to a Kafka broker

Avro Router

  • Transforms binary log events to local Avro files

Cat Router

  • Gets combined results for a query from multiple back-end servers

Mirror Router

  • Tests database upgrades by comparing query metrics between multiple servers

Feature

Read/Write Split Router

Read Connection Router

Binlog Router

Kafka CDC Router

Supports MariaDB Replication deployments

Yes

Yes

Yes

Yes

Supports Galera Cluster deployments

Yes

Yes

Yes

No

Supports Multi-Node Enterprise ColumnStore deployments

Yes

Yes

No

No

Performs query-based load balancing

Yes

No

No

No

Routes client connections to multiple servers simultaneously

Yes

No

No

No

Routes write queries to primary and read queries to replicas

Yes

No

No

No

Automatically reconnects clients to the new primary after failover or switchover

Yes

No

No

No

Automatically replays transactions on the new primary after failover or switchover

Yes

No

No

No

Automatically retries failed queries

Yes

No

No

No

Enforces causal reads to avoid reading stale data caused by slave lag

Yes

No

No

No

Performs connection-based load balancing

No

Yes

No

No

Routes client connections to configured server type

No

Yes

No

No

Mitigates the effect of primary failures by acting as a Binlog Server

No

No

Yes

No

Reduces bandwidth requirements of primary server in environments with many replica servers

No

No

Yes

No

Replicates from MariaDB to a Kafka broker

No

No

No

Yes