Skip to content

I'm Josue Garcia, a database administrator. I keep MySQL taking writes when its primary dies, and I'm growing that into data engineering.

6.9s

From docker kill on the primary to the first accepted write, under load on my live three-server stack. By hand, the same drill took 491.7 s. Zero failed writes, zero acknowledged writes lost.

Kill to first write

0.0 s

ProxySQL :6033writer: mysql
mysqlprimary, read-write
mysql-replicareplica, lag 0
mysql-replica-2replica, lag 0
  1. readyThree servers, one endpoint, a write every second.

Writes acknowledged 2,118 · failed 0

A replay of the measured drill. The times and counts are the real ones.

Server racks behind mesh doors, patch cables and status lights
EXPLAIN ANALYZE
SELECT id, title, date_posted FROM jobs
WHERE seniority = 'Senior'
  AND date_posted BETWEEN '2024-01-01' AND '2024-06-30'
ORDER BY date_posted DESC LIMIT 50;

CREATE INDEX idx_seniority_date_posted
  ON jobs (seniority, date_posted);

One index, 17 times faster

26.8 ms. MySQL walked 335,892 rows in the date range, checking seniority on each.

1.6 ms. One range scan over matching rows only, already in date order.

A million rows, tuned and measured

Languages
Bash, SQL
Databases
MySQL, 3NF schema design, EXPLAIN, Indexing
Data Eng
MinIO, ETL, Data quality checks
Infra
Docker, Docker Compose, Linux Administration, Backup/restore
Analysis
GTID Replication, High Availability, Failover Engineering, Prometheus, Grafana, Incident Response, ERD, Window functions, CTEs, Benchmarking
Other
ProxySQL, Orchestrator, TLS, Python, Uptime Kuma, PromQL, Debezium, Kafka, Kafka Connect, PostgreSQL, CDC, Apache Airflow
Labelled fibre cables plugged into a network switch
SHOW REPLICA STATUS\G
Replica_SQL_Running: No
Last_SQL_Error: Errno 1049 "Unknown database"

SHOW DATABASES;
analytics, bookstack_db, budget_db, metabase_app,
movielens, portfolio, project1_jobs, project3_perf,
sandbox_db, todo_db

The replica stopped on a database it never had

The primary's binlog carries every database on the server, and real app traffic hit one the replica was missing. The fix was to replicate the whole server, which is what a failover needs anyway.

How the replication was built and broken

All writing

Building My Self-Hosted Data Portfolio

Why I run my own MySQL instead of a managed one, the Docker/Tailscale stack behind it, and how this blog itself works under the hood.

Read itAug 8, 2026

Portrait of Josue Garcia

I keep databases fast, replicated and recoverable. I learn by running the real thing: this site, its database and the pipelines behind it all live on a server in my home, wired together with the same tools teams use in production. When something breaks, and I break it on purpose, I write down what happened, what it cost and how I fixed it.

Does
Database administration: MySQL, Postgres, replication, failover
Learning
Data engineering: Airflow, Kafka, dbt
Runs on
One server at home, three MySQL nodes
Open to
Database administration and data engineering roles