RonDB training · module 01 of 25 · 14 min
What RonDB is and why it exists
A distributed key-value database with SQL, built for predictable latency and availability that never stops.
RonDB · in one slide
RonDB: a distributed, shared-nothing database with its data in memory and on disk
- A fork of MySQL NDB Cluster, the NDB storage engine of the MySQL server.
- In-memory and on-disk columns, up to 1 PiB of storage.
- Online scaling of storage and of compute, both horizontal and vertical.
- ACID: in-memory data is made durable through a REDO log and checkpoints.
- Open source, written in C++, developed by Hopsworks.
| Active-active | Active-passive | |
|---|---|---|
| Synchronous, across availability zones | 1–3 replicas inside one cluster | — |
| Asynchronous, across regions | n clusters, with conflict resolution | n clusters |
Replication inside a cluster is synchronous; between clusters it is asynchronous.
docs: index.md · config_num_replicas.md
LATS · the four properties RonDB delivers together
LATS: Low Latency, high Availability, high Throughput, scalable Storage
Many databases have two or three of these. RonDB is built to deliver all four at once: the fastest key-value store with SQL support.
docs: index.md · rondb_use_cases.md
PART 1
Origins: a telecom database
Requirements from network databases at Ericsson that still shape RonDB.
History · from a PhD study to RonDB
RonDB history: three decades in production systems
docs: rondb_rationale.md · rondb_use_cases.md (Number Portability Demo) · rondb_special.md · rondb_innodb.md · new_features_2104.md
The study · UMTS, number portability, DNS, intelligent networks, news-on-demand…
The PhD study: ten conclusions that still shape RonDB
- Predictable response time requires a main-memory database
- Availability requires a shared-nothing architecture
- Predictable response time requires a real-time scheduler
- Applications must not execute inside the DBMS, unless protected
- Throughput requires a main-memory database
- Some applications need large objects on disk inside the DBMS
- Throughput requires a scalable database
- The most common operation is a key lookup
- Availability requires replicated data
- Most applications are write-intensive
docs: rondb_rationale.md (introduction)
PART 2
AlwaysOn, and where RonDB runs
Less than 30 seconds of downtime per year takes more than a replication algorithm.
AlwaysOn · Class 6, less than 30 seconds of downtime a year
AlwaysOn: a clever replication algorithm is one of seven ingredients
ndbrequire stays on in production: a wrong state stops the node.docs: how_to_always_on.md
Availability · readable and writable, all the time
Availability classes: from "high availability" to AlwaysOn
| Level | Availability | Downtime per year | How |
|---|---|---|---|
| Typical cloud | 99.95% | up to 260 minutes | replication across availability zones |
| Class 4 | 99.99% | no more than 50 minutes | what most IT calls "high availability" |
| Class 5 | 99.999% | no more than 5 minutes | one RonDB cluster, online through upgrades and schema changes |
| Class 6 · AlwaysOn | 99.9999% | less than 30 seconds | RonDB clusters in two data centres, with global replication |
docs: rondb_use_cases.md (introduction) · rondb_special.md
Use cases · billions of people use NDB without knowing it
Use cases: where NDB and RonDB run
docs: rondb_use_cases.md
Scale · reads and writes
RonDB scale: millions of writes per second, which very few systems reach
205M
reads per second, demonstrated by NDB
20M
writes per second, the same benchmark
104.5M
key lookups per second through the REST API, RonDB 24.10
A distributed transaction reading and writing hundreds of rows finishes in a few milliseconds; a simple transaction can complete in less than 100 µs.
docs: rondb_use_cases.md (introduction) · www.rondb.com (REST benchmark, 6 data nodes, AWS Graviton4)
Fit · an honest boundary
When RonDB is not the best fit
Hard to beat RonDB
- High availability is required.
- High update rates, and replication.
- Predictable latency under mixed load.
- Data and load larger than one machine.
Where it struggles
- No need for availability, and everything fits in one machine: an in-memory database without context switches is hard to beat there.
- Pure analytics: RonDB stores rows, for OLTP with some analytical queries.
docs: rondb_use_cases.md (introduction) · rondb_rationale.md (OLTP, OLAP and relational models)
PART 3
Design: a data server, separate from query servers
Why RonDB is a key-value database with SQL as an added value, and an architecture borrowed from a telephone switch.
Data server and query server · where to draw the line
Three ways to put an application, a query server and a data server together
Fully integrated: a key lookup in AXE's DBS took 2 assembler instructions. But the application can damage the data.
Colocated is the classic design. It is specialised: if the API is SQL, every access goes through SQL.
RonDB separates them: the data server offers key lookups, scans, schema changes and event streams over a network protocol; query servers sit on top.
Disk databases now split too: storage servers apart from query servers, close to RonDB's division. But RonDB's data servers also handle in-memory data.
docs: rondb_rationale.md (Separation of Data Server and Query Server)
Trade-off · what the separation costs and what it buys
Separating query and data servers costs one network hop and buys availability and scale
The cost
- An SQL query passes through several threads and a network hop to reach the data.
- A combined query and data server is always faster on a single machine.
- Colocating mysqld and the data node on one host brings the two close again.
What it buys
- Only a small, checked API can change the data.
- A fast path for key lookups that skips SQL entirely.
- SQL, NDB API, LDAP and file systems on the same data.
- Queries parallelised inside the data nodes.
For SQL, RonDB is close to MySQL/InnoDB; once its parallel query execution comes into play, it is faster.
docs: rondb_rationale.md (Drawbacks of RonDB Model, Advantages and Disadvantages)
Predictable response time · a real-time scheduler inside the data node
Predictable latency: short signals keep a heavy query from blocking a key lookup
A complex query is cut into short signal executions; each puts itself back in the queue and waits for its next turn.
Traffic queries slot in between. With no traffic, the complex query gets the CPU to itself. Latency stays stable up to about 90% load.
docs: rondb_rationale.md (Predictable response time requirements, How does it work)
Shared-nothing · why every telecom database chose it
Shared-nothing: failover without replaying a log
Shared disk scales a few big servers over one storage system. Shared nothing gives every node its own data and logs, replicated in its node group.
Every transaction updates data and logs on all replicas, so failover only updates the distribution: under a millisecond once the failure is detected.
docs: rondb_rationale.md (Shared-nothing architecture) · how_to_always_on.md
The CAP theorem · two answers, at two levels
CAP theorem: consistent inside a cluster, available across clusters
Inside one cluster: C + A
If the network splits the cluster, both halves are not allowed to continue: that would break consistency. RonDB survives as many partition scenarios as it can without giving up consistency.
Between clusters: A + P
Replication to another region is asynchronous, in groups of transactions (epochs). If the network between them splits, every cluster keeps running; writes in all clusters are possible with conflict resolution.
docs: rondb_rationale.md (RonDB and the CAP theorem)
Heritage · the AXE telephone switch, Ericsson, 1970s
AXE heritage: blocks that own their data, signals as the only way in
AXE's engineers copied hardware: an integrated circuit only talks to another through a signal on a wire.
So a block owns its data and nothing can peek at it; the only way in is a signal. RonDB's data node is built the same way, as large C++ classes.
The architecture makes bugs findable, and a virtual machine runs the signals with almost no cost to switch between tasks.
docs: how_to_always_on.md · rondb_rationale.md (AXE VM)
Recap · module 01
What to take away
- RonDB is a fork of NDB Cluster: a distributed, shared-nothing database for LATS.
- It was born from telecom requirements: main memory, a real-time scheduler, replication, shared nothing.
- AlwaysOn, less than 30 seconds of downtime a year, takes seven ingredients, not only replication.
- The data server is separate from query servers: SQL, NDB API, REST and more on the same data.
- Consistent inside a cluster, available across clusters.
- Blocks and signals, after AXE, give predictable latency and findable bugs.
Next · 02 · Cluster anatomy: nodes, node groups, partitions and replicas
RonDB training · 25 modules · you are at 01