Skip to content

SYSTEM Cited by 1 source

DRBD

DRBD (Distributed Replicated Block Device — en.wikipedia.org/wiki/Distributed_Replicated_Block_Device) is a Linux kernel module that replicates block-level writes from an active node to a standby node synchronously, providing a shared- nothing active/standby HA shape without a shared-disk SAN. Developed initially by LINBIT in 2001; long predates most container-era storage primitives.

What it does

  • Sits below the filesystem as a virtual block device (/dev/drbdN).
  • Every write to the active node's DRBD device is synchronously replicated to the standby's DRBD device over the network before it acknowledges the write up the stack.
  • On failover, the standby is promoted to primary and its local block device becomes authoritative.
  • Integrates with cluster managers (Pacemaker, Heartbeat, custom tooling) for failover orchestration; DRBD itself only handles the replication mechanic, not the decision to fail over.

See concepts/synchronous-block-replication for the replication semantic and concepts/active-standby-replication for the HA shape.

Wiki canonical instance

GitHub Pages uses DRBD to synchronously replicate user-site data between the active + standby fileserver in each Dell R720 pair. Pre-2015 the single pair ran 8 DRBD-backed partitions; the 2015 rewrite preserved this shape — "each pair is largely similar to the single pair of machines that the old Pages infrastructure ran on. In fact, we were even able to reuse large parts of our configuration and tooling for the old Pages infrastructure on these new fileserver pairs due to this similarity". DRBD keeps the standby "always up to date and ready to take over from the active at a moment's notice — say for example if the active machine crashes or we need to take it down for maintenance." (Source: sources/2025-09-02-github-rearchitecting-github-pages)

Use-shape trade-offs

  • Simple to reason about. Filesystem, files, paths, nginx document root — all stock. No application changes needed to get HA.
  • Write latency = network RTT to standby + standby disk ack. Synchronous replication is load-bearing for durability but caps achievable write throughput at the slowest link.
  • Scale-up, not scale-out per pair. A pair's storage ceiling is the capacity of one machine's disks; scaling past that requires multiple pairs + a layer above that routes to the right pair. GitHub Pages is the canonical [[patterns/horizontally-scale- stateful-tier-via-pairs]] instance on the wiki.
  • Split-brain risk if the two machines lose sight of each other without a fencing mechanism; requires an orchestrator that guarantees only one primary at a time.

Stub page

Stub anchoring DRBD's role in the wiki's first DB-routed static- hosting source. Broader DRBD coverage (protocol modes — Protocol A/B/C, replication topology variants, DRBD 9 multi-node, tooling) out of scope.

Seen in

  • sources/2025-09-02-github-rearchitecting-github-pages — DRBD synchronously replicates 8 partitions between active + standby fileserver per pair on GitHub Pages' pre- and post-2015 fileserver tier. Preserved unchanged across the rewrite — horizontal scaling came from adding pairs, not rearchitecting the pair.
Last updated · 319 distilled / 1,201 read