Sha256: 51a4d93c13cfe86da3e181a559264673a1f2fe48981c978b89bc052c39026529

Contents?: true

Size: 1.03 KB

Versions: 5

Compression:

Stored size: 1.03 KB

Contents

---
title: Heartbeat
inMenu: false
---

h2. What is a Heartbeat?

A heartbeat is a way to monitor the "pulse" of your replication, and give you a reliable look at the "real time" latency of your replication.  Heartbeats work as follows

<ul>
  <li>Write a heartbeat timestamp to the master</li>
  <li>Read the most recent heartbeat timestamp that was replicated to the slave</li>
  <li>Compare the replicated timestamp to the current time.</li>
  <li>Ooola: The time it took to replicate a row from the master to the slave.  The latency of the replication.</li>
</ul>

There is also a little timing overhead. It might take you a couple seconds to disconnect from the master, connect to the slave, and read the heartbeat, but that should be minimal.

Also, just because your heartbeats are replicating does not necessarily mean all your data is up to date, but it does mean replication is working.  A lot of changes to the master, especially with lots of data (binary blobs or whatever) will take some time to transfer to the slave machine and then run.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
reptile-0.1.2 webgen_site/src/terms/heartbeat.page
reptile-0.1.1 webgen_site/src/terms/heartbeat.page
reptile-0.1.0 webgen_site/src/terms/heartbeat.page
reptile-0.0.6 webgen_site/src/terms/heartbeat.page
reptile-0.0.5 webgen_site/src/terms/heartbeat.page