Tagged articles
4 articles
Page 1 of 1
Raymond Ops
Raymond Ops
Apr 25, 2026 · Databases

How to Reduce MySQL Master‑Slave Replication Lag from 30 seconds to Milliseconds

This article walks through the root causes of MySQL master‑slave replication delay, demonstrates step‑by‑step diagnostics using SHOW SLAVE STATUS, pt‑heartbeat, and binlog comparisons, and provides concrete configuration changes, query rewrites, hardware upgrades, and monitoring scripts that can shrink lag from dozens of seconds to sub‑millisecond levels.

LatencyReplicationmonitoring
0 likes · 23 min read
How to Reduce MySQL Master‑Slave Replication Lag from 30 seconds to Milliseconds
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 19, 2025 · Databases

Why MySQL 5.7 Seconds_Behind_Master Is Unreliable and How pt‑heartbeat Provides Accurate Replication Lag Measurement

The article explains why the built‑in MySQL 5.7 Seconds_Behind_Master metric often misrepresents replication delay, analyzes its design flaws, and demonstrates how the Percona Toolkit's pt‑heartbeat tool can reliably measure master‑slave lag with real‑time precision.

Database MonitoringReplicationSeconds_Behind_Master
0 likes · 10 min read
Why MySQL 5.7 Seconds_Behind_Master Is Unreliable and How pt‑heartbeat Provides Accurate Replication Lag Measurement
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 8, 2020 · Databases

Percona Toolkit Utilities for MySQL: Archiving, Config Comparison, Replication Lag, Variable Advice, and Debugging

This guide introduces several Percona Toolkit command‑line tools—pt‑archiver, pt‑config‑diff, pt‑heartbeat, pt‑variable‑advisor, and pt‑pmp—explaining their purpose, providing example commands for data archiving, configuration comparison, accurate replication lag measurement, variable optimization suggestions, and stack‑trace debugging, plus a quick installation snippet.

Database Administrationmysqlpercona-toolkit
0 likes · 11 min read
Percona Toolkit Utilities for MySQL: Archiving, Config Comparison, Replication Lag, Variable Advice, and Debugging
Java High-Performance Architecture
Java High-Performance Architecture
Nov 7, 2016 · Databases

How to Monitor MySQL & PostgreSQL Replication Lag with pt-heartbeat

pt-heartbeat, a Percona Toolkit utility, enables precise monitoring of MySQL and PostgreSQL replication lag by creating a heartbeat table on the master, updating timestamps, and comparing them with slaves, with detailed installation steps, usage examples, and configuration guidance for reliable replication health checks.

Database MonitoringPostgreSQLReplication Lag
0 likes · 5 min read
How to Monitor MySQL & PostgreSQL Replication Lag with pt-heartbeat