Low Water Mark and High Water Mark in System Design
When designing large-scale distributed systems , we deal with thresholds all the time — memory, queues, replication logs, caches, and network buffers. Two key concepts that help maintain stability and efficiency are High Water Mark (HWM) and Low Water Mark (LWM) . They are critical in replication protocols, messaging queues, and quorum systems . 🔹 High Water Mark (HWM) In system design, HWM is the maximum threshold at which the system takes corrective action to avoid overload or inconsistency. It prevents overflow , ensures stability, and protects resources. 🔹 Low Water Mark (LWM) The LWM is the safe lower threshold that signals the system has recovered enough to resume normal operations . It prevents rapid toggling between "block/unblock" states (avoids thrashing). 🔹 Why Do We Need Both? The gap between HWM and LWM (called hysteresis ) ensures smooth control. Without it, systems would keep toggling rapidly whenever they touch the threshold. 🔹 Application...