Distributed SQL with MariaDB Xpand

MariaDB Enterprise Server 10.5 introduces MariaDB Xpand, which provides distributed SQL, high availability, fault tolerance, write scaling, and horizontal scale-out for transactional workloads with MariaDB Enterprise Server. MariaDB Xpand consists of the Xpand storage engine and the MariaDB Xpand service.


MariaDB Xpand provides distributed SQL with the MariaDB Xpand service and the Xpand storage engine included with MariaDB Enterprise Server 10.5:

  • Xpand supports transactional workloads

  • Xpand is strongly consistent.

  • Xpand leverages a shared-nothing architecture to efficiently execute distributed SQL.

  • Xpand provides high availability (HA) and fault tolerance by design.

  • Xpand scales out horizontally for both reads and writes.


Want to use MariaDB Xpand immediately? Get Started with MariaDB Xpand.

Xpand Architecture


Architecture of MariaDB Xpand is designed to provide distributed SQL, high availability, fault tolerance, write scaling, and horizontal scaleout for transactional workloads.


Xpand stores redundant copies of data on multiple nodes to provide high availability for distributed SQL.

Data Distribution

Xpand stores table and index data separately, and both are split into slices independently. Xpand distributes replicas of these slices through the deployment, ensuring the data remains highly available and fault tolerant.

Fault Tolerance

Xpand provides fault tolerance by maintaining multiple copes of data across the deployment.

Query Evaluation

Data stored on Xpand tables is distributed across all Xpand Nodes in the deployment. When you issue an SQL statement to an Xpand Node, Xpand evaluates the query, optimizes it to form a plan, then retrieves data from slices on relevant Xpand Nodes.

Query Optimizer

Xpand has a sophisticated distributed query planner, compiler, and distributed shared-nothing execution engine.


The rebalancer process maintains a healthy distribution of data by modifying the placement of data with minimal interruption to user operations and relieving the DBA from the burden of manual data placement.

Strong Consistency

Xpand uses a consistency model that sclaes with a combination of intelligent data distribution, MVCC, and the Paxos Protocol, allowing Xpand to scale writes, scale reads in the presence of write workloads, and provide strong ACID semantics.

Xpand Administration

Administration Tools

How to use Xpand's administration tools.

Allocating Disk Space for Fault Tolerance and Availability

How to allocate disk space that can be used to recover from failures.

Decrease device1 Size

How to shrink device1, which is the primary file used by Xpand.

Deploying MariaDB Xpand

How to install and configure an Xpand deployment.

Email Alerts

How to configure Xpand to send email alerts.

Failure and Recovery

How to recover from various failures.

Fast Backup and Restore

How to backup an Xpand deployment.

Group Changes

How various node changes affect the deployment.


How to obtain and apply your license.

Network Security

How to configure your network security.


How to use MariaDB Replication with Xpand.


How to reduce your deployment's capacy by removing nodes.


How to increase your deployment's capacity by adding nodes.


How to configure your deployment to use zones.

Monitoring Xpand

Monitoring Overview

How to monitor Xpand.


How to monitor Xpand with Grafana.


How to monitor Xpand with Zabbix.

Term Definitions




One running operating system. A system typically answers one or more IP addresses.


One set of processes running on a system. A service typically answers one or more TCP port or UNIX socket. A service is typically started and stopped using systemd.


One or more pid running on a system, associated with a service. A service may include one or more process. A process typically serves one or more TCP connection or socket connection.


One service, or multiple services working in concert, on a system.


One service, or more than one service connected by a multi-node technology. A deployment may operate on one system or multiple. A deployment may contain one node or multiple.


A component of MariaDB Enterprise Server which may be included in the server function optionally, either at runtime or compile-time, and which adheres to an established plugin architecture within Enterprise Server.


The case where multiple nodes exist in a deployment.

MariaDB Enterprise Server service

The MariaDB Enterprise Server service that runs on each node in a deployment.

MariaDB Xpand service

The MariaDB Xpand service that runs on each node in a deployment.


Creating an Xpand Table

To create an Xpand table, use the CREATE TABLE statement with the ENGINE=Xpand option:


CREATE TABLE hq_sales.invoices (
   branch_id INT NOT NULL,
   customer_id INT,
   invoice_date DATETIME(6),
   invoice_total DECIMAL(13, 2),
   payment_method ENUM('NONE', 'CASH', 'WIRE_TRANSFER', 'CREDIT_CARD', 'GIFT_CARD'),
   PRIMARY KEY(invoice_id)
) ENGINE = Xpand;

FROM information_schema.TABLES
AND TABLE_NAME='invoices';


How many nodes should my MariaDB Xpand deployment have?

A MariaDB Xpand deployment should have 3 or more nodes to provide high availability and to avoid a split-brain scenario.


Xpand Reference

MariaDB Enterprise Server Reference