Files
openwaf/docs
Pavlo Ratushnyi f7ced94f75 The TTL knob got measured, and a sentence in the research turned out to be stale
`research/2026-10-01-multi-instance/RESULTS.md` said, correctly at the time, that
the snapshot TTL "is not operator-tunable... so 'shorten the TTL' is currently a
rebuild, not a deployment change". OPEN-13 made it
`OpenWaf:State:RefreshTtlSeconds` (validated 1-300 s, startup aborts naming the
key outside that range). A claim that was true and is now false is still a claim
sitting in a document, so it is corrected in place, with what changed and when,
rather than quietly rewritten.

`run4.sh` measures the option that claim was blocking. Same stack and same method
as D3 — edge-b serves a steady 200-only stream from one source (a refusal stream
bans its own probe, which is the mistake `run2.sh` made), edge-a writes an
operator block at t0, the first sample edge-b answers as a refusal is the
propagation number. Two phases, and the TTL is read back from `/healthz` rather
than assumed from the environment, because a typo in the key name would otherwise
measure 30 s twice and report it as two different settings.

    ttl=30 (default)  samples=1223 over 44.1 s (~27.7 req/s)  enforced 23 100 ms after the write
    ttl=5             samples=1247 over 44.3 s (~28.1 req/s)  enforced  3 367 ms after the write

**23.1 s → 3.4 s: a 6.9x cut**, and the 30 s phase independently reproduces D3's
23.7 s, which is the second time that number has come out the same.

What it does not say. The request path through edge-b during the same runs: p50
1.75 ms / p95 3.15 ms at TTL 30, p50 1.93 ms / p95 2.78 ms at TTL 5, n=200 each.
The two percentiles move in opposite directions, so the honest reading is "inside
noise", not "cheaper" — and a shorter TTL is more refresh round trips per process
per minute (12 against 2), cheap at the snapshot size that was measured (~3 ms of
queries at 2000 blocks) and unmeasured at any larger size.

For OPEN-12 this turns option (b) from an assumption into a measurement, and
leaves its limit exactly where it was: shortening the TTL fixes propagation, and
does nothing about D1 — four refusals split 2+2 across two edges at threshold 3
still produce no ban anywhere. The streak map is still the thing that would have
to move.

`docs/ARCHITECTURE.md` evolution triggers 2 and 3 updated with what is now true:
the geo-staleness trigger partly fired and was handled (including the case the
90-day runtime alarm does not catch), and the multi-instance trigger now carries
both reproduced findings and the measured TTL effect.
2026-10-01 17:18:12 +02:00
..