Inside databases
Six engines I work with. Each is drawn the way it is built, and beside it is what I did on it.
OLTP · InnoDB
MySQL
InnoDB stores a table’s rows in its clustered index, normally the primary key: a B-tree whose leaf pages hold the records. Replicas replay the changes the source records in its binary log.
My work
A Percona Server for MySQL cluster (8.0, then 8.4) behind ProxySQL with Orchestrator: automatic failover, reads split from writes, lagging replicas taken out of reads, asynchronous GTID-based replication. The grants and the ProxySQL rules for writes and reads are in Salt; MySQL and ProxySQL are installed through Terraform.
Inside MySQLOLTP · WAL
PostgreSQL
A change reaches the data files only after the log record that describes it is on disk. After a crash, changes are redone from that log; a standby keeps applying the same log, received from the primary.
My work
A PostgreSQL cluster on Patroni with etcd and HAProxy. Monitoring of vacuum and resources is automated.
Inside PostgreSQLMPP analytics · Arenadata DB
Greenplum
A massively parallel database based on PostgreSQL: the master parses and optimises a query and sends the plan to the segments, each holding its own portion of the data; most operations run on all of them in parallel.
My work
A Greenplum 6 cluster: PgBouncer, a standby master, resource groups, expansion with gpexpand, a standby cluster, vacuum on a schedule from CI. Rolled out by Ansible, backed up with WAL-G; tuning queries and I/O took load off the cluster.
Inside GreenplumColumnar · MergeTree
ClickHouse
A column-oriented database: the values of each column are stored one after another. In its MergeTree tables the data lies in parts sorted by the sorting key and merged in the background, and a query reads from disk only the columns it needs.
My work
An asynchronous ClickHouse cluster and ingestion into it from Kafka and RabbitMQ; part of the analytics moved here from Greenplum, from which data went to ClickHouse through external tables.
Inside ClickHouseWide-column · shard-per-core
ScyllaDB
A distributed database compatible with Apache Cassandra: data is placed on the nodes by its partition key, and inside a node it is split across the CPU cores, shard per core.
My work
Provisioned on GCP with Terraform and Terragrunt; watched by the ScyllaDB Monitoring Stack, built on Prometheus and Grafana.
Inside ScyllaDBKey-value · index in RAM
Aerospike
A distributed multi-model data store, key-value among its models: a record’s key places it in one of its namespace’s 4096 partitions, spread evenly over the nodes, and the client sends reads and writes to the partition’s data master. Data retrieval takes a single hop.
My work
A cluster deployed in the cloud: namespaces and their storage set up, cross-datacenter replication with XDR.
Inside AerospikeNext section
Data integration
Data moved between systems: MySQL changes streamed into Greenplum, changes from Kafka into MySQL, and data for analytics into ClickHouse.
Data integration To the main page
Sources
- MySQL 8.4: Clustered and Secondary Indexes
- MySQL 8.4: The Physical Structure of an InnoDB Index
- MySQL 8.4: Replication Implementation
- PostgreSQL 17: Write-Ahead Logging (WAL)
- PostgreSQL 17: Log-Shipping Standby Servers
- Greenplum 6: About Greenplum Query Processing
- Greenplum 6: About the Greenplum Architecture
- ClickHouse: MergeTree
- ClickHouse: What is ClickHouse?
- ScyllaDB: Data Distribution with Tablets
- ScyllaDB: Apache Cassandra Compatibility
- ScyllaDB: System Requirements
- Aerospike: Architecture
- Aerospike: Data distribution