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.
Overview
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.
Note
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. |
|
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. |
|
Xpand provides fault tolerance by maintaining multiple copes of data across the deployment. |
|
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. |
|
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. |
|
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
How to use Xpand's administration tools. |
|
How to allocate disk space that can be used to recover from failures. |
|
How to shrink |
|
How to install and configure an Xpand deployment. |
|
How to configure Xpand to send email alerts. |
|
How to recover from various failures. |
|
How to backup an Xpand deployment. |
|
How various node changes affect the deployment. |
|
How to obtain and apply your license. |
|
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
How to monitor Xpand. |
|
How to monitor Xpand with Grafana. |
|
How to monitor Xpand with Zabbix. |
Term Definitions
Term |
Definition |
---|---|
System |
One running operating system. A system typically answers one or more IP addresses. |
Service |
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. |
Process |
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. |
Node |
One service, or multiple services working in concert, on a system. |
Deployment |
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. |
Plugin |
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. |
Multi-Node |
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. |
Examples
Creating an Xpand Table
To create an Xpand table, use the CREATE TABLE statement with the ENGINE=Xpand
option:
CREATE DATABASE hq_sales;
CREATE TABLE hq_sales.invoices (
invoice_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
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;
SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA='hq_sales'
AND TABLE_NAME='invoices';
FAQ
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.