whatisgithub

What is mysql-lagslave?

ripienaar/mysql-lagslave — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2011-05-18

5RubyAudience · ops devopsComplexity · 3/5DormantSetup · moderate

In one sentence

A Ruby daemon that deliberately keeps a MySQL replica a set number of seconds behind its master, using heartbeat timestamps for accurate lag control.

Mindmap

mindmap
  root((repo))
    What it does
      Controls replica lag time
      Uses heartbeat timestamps
      Throttles replication
    Tech stack
      Ruby
      MySQL
      mk-heartbeat
    Use cases
      Disaster recovery buffer
      Regulatory delayed replicas
      Testing with lagged data
    Audience
      Database administrators
      Ops engineers
    Notes
      Nagios monitoring included
      Simpler alternatives exist
      Configurable target lag

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Keep a disaster-recovery replica intentionally delayed so accidental deletes can be recovered

USE CASE 2

Maintain a fixed lag window for regulatory or compliance reasons

USE CASE 3

Monitor replica lag drift with the included Nagios check script

USE CASE 4

Test application behavior against deliberately stale replica data

What is it built with?

RubyMySQL

How does it compare?

ripienaar/mysql-lagslavecocoapods/cocoapods-podfile_infofastlane/nightly
Stars555
LanguageRubyRubyRuby
Last pushed2011-05-182015-02-252018-12-11
MaintenanceDormantDormantDormant
Setup difficultymoderateeasymoderate
Complexity3/52/52/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires running mk-heartbeat on the master plus this daemon on the replica, with matching configuration.

Copy-paste prompts

Prompt 1
Help me configure mysql-lagslave to keep my replica 12 hours behind the master.
Prompt 2
Explain how the heartbeat timestamp from mk-heartbeat is used to measure real replication lag in this project.
Prompt 3
Set up the Nagios monitoring script from this repo to alert when replica lag drifts outside my target window.
Prompt 4
What database connection settings and logging preferences does this daemon require to run?

Frequently asked questions

What is mysql-lagslave?

A Ruby daemon that deliberately keeps a MySQL replica a set number of seconds behind its master, using heartbeat timestamps for accurate lag control.

What language is mysql-lagslave written in?

Mainly Ruby. The stack also includes Ruby, MySQL.

Is mysql-lagslave actively maintained?

Dormant — no commits in 2+ years (last push 2011-05-18).

How hard is mysql-lagslave to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is mysql-lagslave for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.