Replica Catch-Up and Backlog Clearance Time
Estimate the time and capacity needed to clear replication backlog and keep up with continuously arriving changes.
Processing must also handle continuing arrivals. This constant-rate estimate differs from lag seconds shown by a monitoring system.
Results
—hours
- Backlog at evaluation time
- —
- Additional processing rate needed by the deadline
- —
- Required apply rate to clear backlog by the deadline
- —
- Final-interval net clearance rate
- —
- Backlog at the rate-change time
- —
- Caught-up and sustainable status at the deadline
- —
Results update automatically when the required values are entered.
Method, applicability and sources
Calculation method
For each interval, backlog B(t) = B(0) + (arrival rate a − apply rate p) × time, bounded below by 0. At constant rates with p > a, catch-up time = initial backlog ÷ (p − a). If p ≤ a and backlog remains, sustained catch-up is impossible. With a rate change, first calculate backlog at the change time, then continue with the new rates. Required apply rate = post-change arrival rate + backlog at change ÷ (deadline − change time). Constant-rate mode uses the initial values. Processing shortfall = max(0, required rate − current/post-change apply rate).
Worked example (hypothetical values)
With backlog 120 GiB, arrival rate 15 GiB/hour, apply rate 35 GiB/hour, and evaluation at 4 hours, net clearance is 20 GiB/hour, catch-up takes 6 hours, and backlog at 4 hours is 40 GiB. Clearing within 4 hours requires 45 GiB/hour, a shortfall of 10 GiB/hour.
Applicability and limitations
Cases with initial backlog, interval-average arrival rates, and effective apply rates measured in the same unit, without loss or retransmission and with constant processing while backlog exists. Does not convert observed lag seconds from PostgreSQL or similar systems into forecast catch-up time. Excludes network latency, WAL retention expiry, retransmissions, slot contention, instantaneous throughput fluctuations, multiple rate changes, and failover readiness.
Method and sources
Method: E347-fluid-queue-step-v1.0(2026-11-13). Data recorded: 2026-11-13.