Distributed SQL with MariaDB Xpand

MariaDB Xpand provides distributed SQL, high availability, fault tolerance, write scaling, and horizontal scale-out for transactional workloads. MariaDB Xpand can integrate with the Xpand storage engine in MariaDB Enterprise Server 10.5 and later.

Overview

  • Xpand provides distributed SQL.

  • Xpand integrates with the Xpand storage engine in MariaDB Enterprise Server 10.5 and later.

  • 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.

Latest Software Releases

Xpand

Version

Latest Release

Latest Release Date

MariaDB Xpand 6

6.0.2

2021-09-14

MariaDB Xpand 5.3

5.3.17

2021-09-14

Xpand Storage Engine

ES Version

Xpand Version

Latest ES Release

Latest ES Release Date

MariaDB Enterprise Server 10.6

MariaDB Xpand 6

10.6.4-1

2021-08-26

MariaDB Enterprise Server 10.5

MariaDB Xpand 5.3

10.5.12-8

2021-09-14

Deployment Instructions

To deploy MariaDB Xpand, choose a topology:

Topology

Description

Xpand Performance

  • Delivers maximum throughput and lowest latency.

  • Uses MaxScale as a transparent database proxy to monitor node health and route queries to Xpand nodes.

  • Xpand stores data in a distributed manner and executes queries using parallel query evaluation.

Xpand Storage Engine

  • Leverages Xpand's benefits and maximizes compatibility with MariaDB Enterprise Server (ES).

  • Uses MaxScale as a transparent database proxy to monitor node health and route queries to ES nodes.

  • ES nodes store non-Xpand tables and interact with Xpand tables using the Xpand Storage Engine.

  • Xpand stores data for Xpand tables in a distributed manner and executes queries using parallel query evaluation.

For additional information, see "Deploy".

Term Definitions

Term

Definition

Node

One service on a system.

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.

Rebalancer

Process that balances replicas across the Xpand nodes.

Replica

Slice of a representation written to disk.

Representation

Table data as defined by an index. Table with multiple indexes generates multiple representations of its data.

Slice

Distribution of rows in a representation. Representations typically multiple slices, which are in turn written to disk as replicas.

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?

  • 1 or more MaxScale nodes are required.

  • 3 or more Xpand nodes are required.

To avoid problems establishing quorum during a network partition, it is recommended to deploy an odd number of Xpand nodes. If you deploy nodes in multiple zones, it is recommended to use an odd number of zones.

Production Xpand license keys define the maximum number of Xpand nodes which can be deployed.

Reference

Xpand Reference

MariaDB Enterprise Server Reference