How DRBD Enables Real-Time Block-Level Replication for High Availability
DRBD (Distributed Replicated Block Device) is a software‑based, network‑driven block replication solution that mirrors disks, partitions, or logical volumes across servers in real time, offering synchronous and asynchronous modes, transparent failover, and a middle‑layer between the filesystem and physical storage.
Distributed Replicated Block Device (DRBD) is a software‑based, network‑driven block replication solution that mirrors disks, partitions, or logical volumes between servers.
When data is written to the local disk, DRBD simultaneously sends the same data over the network to a remote host, ensuring real‑time synchronization and allowing the remote host to continue serving the data if the local host fails.
The core function of DRBD is mirroring, implemented similarly to a network RAID‑1, providing either synchronous or asynchronous replication modes.
Features:
Real‑time: replication occurs immediately when the application modifies disk data.
Transparency: applications see the mirrored device as a regular block device, independent of the underlying networked servers.
Synchronous mirroring: write operations are performed on both primary and secondary nodes simultaneously.
Asynchronous mirroring: the remote write starts only after the local write completes.
A DRBD system consists of at least two nodes, designated as primary and secondary. The primary node can read and write the DRBD device freely, while the secondary node only receives data from the primary and cannot be accessed for read/write, preserving data consistency.
The DRBD device sits above the physical block device and below the filesystem, forming an intermediate layer between the filesystem and the physical disks.
When the primary node writes data, DRBD intercepts the write, notifies a userspace manager to copy the data to the remote node’s DRBD mirror, and then stores it on the remote disk.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
