PmaControl logo PmaControl
  • Home
  • PmaControl
    • AI Agents 13 on-premise agents
    • Plans Community, Cloud, On-Premise, Premium
    • Documentation Guides, API, architecture
    • Clients 28+ companies
    • FAQ 25 questions / 7 categories
    Databases
    • MariaDB 30 articles
    • MySQL 10 articles
    • Galera Cluster 6 articles
    • MaxScale 3 articles
    • ProxySQL 2 articles
    • Amazon Aurora MySQL 0 article
    • Azure Database 0 article
    • ClickHouse 0 article
    • GCP CloudSQL 0 article
    • Percona Server 0 article
    • SingleStore 0 article
    • TiDB 0 article
    • Vitess 0 article
    Solutions
    • Support 24×7 MariaDB & MySQL emergencies
    • Observabilité SQL Monitoring, alerts, topology
    • Haute disponibilité Replication, failover, Galera
    • Disaster Recovery Backup, restore, RPO/RTO
    • Sécurité & conformité Audit, GDPR, SOC2
    • Migration & upgrade Zero downtime, pt-osc, gh-ost
  • Plans
  • Resources
    • Documentation Technical guides & API
    • FAQ 25 frequently asked questions
    • Testimonials Client feedback & use cases
    • Blog Articles & insights
    • Roadmap Upcoming features
    Areas of expertise
    • Observabilité SQL Monitoring, alerts, Dot3 topology
    • Haute disponibilité Replication, failover, Galera
    • Sécurité & conformité Audit, GDPR, SOC2, ISO 27001
    • Disaster Recovery Backup, restore, RPO/RTO
    • Performance & optimisation Digests, EXPLAIN, tuning
    • Migration & upgrade Zero downtime, pt-osc
    Quick links
    • GitHub Wiki 26 pages — install, engine, plugins
    • Source code Official GitHub repository
    • Support 24×7 MariaDB & MySQL emergencies
    • Book a demo 30 min — real architecture
  • Support 24×7
  • Book a demo
Book a demo
🇫🇷 FR Français 🇬🇧 EN English 🇵🇱 PL Polski 🇷🇺 RU Русский 🇨🇳 ZH 中文
← Back to blog

Making MariaDB Cloud Native: Decoupling Compute from Storage

Published on July 9, 2025 By Sylvain ARBAUDIE
mariadb cloud-native architecture storage
Share X LinkedIn Facebook Email PDF
Making MariaDB Cloud Native: Decoupling Compute from Storage

The Observation: MariaDB Is Not Cloud-Native

Let us be honest: MariaDB / MySQL in their current form are not cloud-native databases. They were designed to run on a single server with local storage. Even master-slave replication architectures are fundamentally full data copies on each node.

In the cloud, this creates several fundamental problems:

  • Storage is coupled to compute. If you need more CPU, you must provision a new server with all the storage. If you need more storage, you must resize the server.
  • Horizontal scaling is limited. Each replica contains a complete copy of the data. Adding a 2 TB slave means copying 2 TB of data.
  • Failover implies downtime. Promoting a slave involves convergence time during which the most recent writes may be lost (in asynchronous replication) or during which the cluster is unavailable (in synchronous replication).

Modern cloud-native databases like Amazon Aurora, Google AlloyDB, or PostgreSQL Neon have solved these problems by decoupling compute from storage.

The Inspiration: PostgreSQL Neon

PostgreSQL Neon is a fascinating project. It takes PostgreSQL and replaces the local storage layer with remote distributed storage. The PostgreSQL engine functions as a pure compute node: it receives queries, plans execution, and exchanges data pages with a remote storage service over the network.

The advantages are spectacular:

  • Instant scaling: adding a compute node requires no data copy
  • Branching: creating a database "branch" (like a Git branch) is instantaneous — it is a metadata operation, not a physical copy
  • Pay-per-use: inactive compute nodes are stopped, you only pay for storage

Could MariaDB follow the same path?

The Handler API: The Natural Decoupling Point

MariaDB has a unique architectural advantage that PostgreSQL does not: the handler API. It is the abstract interface between the SQL engine (parser, optimizer, executor) and the storage engines (InnoDB, Aria, RocksDB, ColumnStore, etc.).

The handler API defines operations such as:

handler::ha_open()       // open a table
handler::ha_read_first() // read the first row
handler::ha_read_next()  // read the next row
handler::ha_write_row()  // write a row
handler::ha_update_row() // update a row
handler::ha_delete_row() // delete a row
handler::ha_index_read() // index-based read

Each storage engine implements these methods. InnoDB implements them by accessing local B-tree pages. Aria implements them differently. RocksDB uses LSM-trees.

What if a storage engine implemented these methods by accessing remote pages over the network?

The PolarDB Approach (Alibaba)

Alibaba has already proven this is possible with PolarDB, which is based on MySQL source code. PolarDB uses:

  • A distributed file system (PolarFS) that replaces local storage
  • A consensus protocol (Raft) for durability
  • A shared page cache between compute nodes

The result is a MySQL whose storage is decoupled from compute. Multiple compute nodes can read the same data simultaneously, and a single node handles writes.

PolarDB shows that the MariaDB/MySQL handler API is a viable decoupling point. Alibaba did not rewrite the SQL engine — they implemented a handler that accesses remote storage.

The Vision: A Remote Handler API for MariaDB

Imagine a MariaDB storage engine called RemoteStore:

CREATE TABLE users (
    id BIGINT PRIMARY KEY,
    name VARCHAR(255)
) ENGINE=RemoteStore
CONNECTION='storage-cluster.internal:9000/db1';

This storage engine would have no local data. Each handler API call would be translated into a network call to a distributed storage service. The storage service would manage:

  • Data replication (3 copies minimum)
  • Durability (distributed write-ahead log)
  • Snapshots and branching
  • Compression and tiering (hot data on SSD, cold data on S3)

Compiling MariaDB Without Embedded Engines

The first step toward this vision would be compiling MariaDB without any embedded storage engine. Today, InnoDB is compiled into the mariadbd binary. Compilation options allow disabling some engines, but InnoDB remains deeply integrated.

A "headless" MariaDB — a pure SQL engine without storage — would look like:

MariaDB SQL Engine (parser + optimizer + executor)
       ↓ handler API
Plugin: RemoteStore → network → Distributed Storage

This headless MariaDB would be lightweight (a few hundred MB of RAM), would start in milliseconds, and could be deployed as a stateless container in Kubernetes.

Technical Challenges

This vision is not without challenges:

Network Latency

Every page access goes through the network. Datacenter network latency is on the order of 100 to 500 microseconds. That is 100 to 1,000 times slower than a local SSD access. An aggressive page cache at the compute node level is essential.

Lock Management

InnoDB manages locks locally. With shared remote storage, lock management must be distributed. This is a hard problem that can introduce additional deadlocks and timeouts.

Distributed Buffer Pool

InnoDB's buffer pool is local. In a cloud-native architecture, a cache invalidation mechanism between compute nodes is needed. When one node writes a page, the caches of other nodes must be invalidated.

Transaction Logging

InnoDB's redo log and undo log are local. In a decoupled architecture, the WAL must be distributed and accessible by all nodes.

What Already Exists

Some components of this vision already exist in the MariaDB ecosystem:

  • MariaDB ColumnStore: a columnar storage engine that can use S3 storage
  • Spider: a storage engine that distributes data across multiple MariaDB servers
  • CONNECT: a storage engine that can access external data sources

None of these engines achieve complete compute/storage decoupling, but they demonstrate the flexibility of the handler API.

Conclusion

Making MariaDB cloud-native is an ambitious but not unrealistic challenge. The handler API offers a natural decoupling point that neither PostgreSQL nor Oracle MySQL have in such a clean form.

Alibaba's PolarDB has proven it is technically feasible. PostgreSQL Neon has proven the market demands it. The question is not "is it possible?" but "who will do it first in the MariaDB community?"

The day MariaDB can start as a 200 MB stateless container, connect to distributed storage, and serve queries in milliseconds — that day, the game changes.


This article was originally published on Medium.

Share X LinkedIn Facebook Email PDF
← Back to blog

Comments (0)

No comments yet.

Leave a comment

PmaControl
+33 6 63 28 27 47 contact@pmacontrol.com
Legal notice GitHub Contact
Do not wait for an incident to understand your architecture. © 2014-2026 PmaControl — 68Koncept