Search Tools

Replica Catch-Up and Backlog Clearance Time

Report an issue

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.

What to calculate

Use the same unit for backlog and all rates. Values are not converted automatically.

Updates already received but not yet applied at the start. Enter a whole number when using items.

Average amount of new updates arriving per hour.

Amount that can actually be applied per hour while backlog exists.

Calculates remaining backlog and the processing rate needed to catch up by this time. Must be greater than 0.

Results

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.