Deterministic pool resizing policy. The scheduling of observation windows
is the caller’s responsibility; this module only decides whether an observed window
should be accepted, rolled back, or aborted.
Flow: proposeIncrease() applies a precautionary increase and returns the proposal.
After the observation window, evaluate(before, after) decides: it accepts if the
throughput gain exceeds minGain and the safety gates pass; it reverts if the
gain is insufficient; it stops if any safety gate has failed.
Deterministic pool resizing policy. The scheduling of observation windows is the caller’s responsibility; this module only decides whether an observed window should be accepted, rolled back, or aborted.
Flow:
proposeIncrease()applies a precautionary increase and returns the proposal. After the observation window,evaluate(before, after)decides: it accepts if the throughput gain exceedsminGainand the safety gates pass; it reverts if the gain is insufficient; it stops if any safety gate has failed.See
Sample Code: Automatically Adjusting Pool Capacity