Rate limiting: signals versus blocks
Recipient novelty and burst patterns are non-blocking anomalies. The hard hourly cap denies.
You are here
SourceEgressAuthorizationSink
Burst window: anomalies, not denials
1. -7200s
STATE RECORDEDRecipient history seeded: team@acme.com. The action ages out of both windows, but the recipient stays known.
2. 0s
ALLOWEDWithin the burst threshold.
3. 4s
ALLOWEDWithin the burst threshold.
4. 8s
ANOMALYRapid burst: 3 actions in 10s
5. 9s
ANOMALYRapid burst: 4 actions in 10s
Hourly window: a hard cap
1. Ten sends recorded
STATE RECORDEDAlready inside the hour, on this lane's own limiter.
2. The eleventh
BLOCKEDHourly limit exceeded (10/10)
Evidence, scope, and reproduction
Scope and instrumentation
The burst count includes the proposal being checked, so a threshold of three flags the third send inside the window rather than the one after it.
Counting only completed actions would leave a burst of exactly three silent.
Defense in depthAction + EgressNo direct T-IN rowExplicit recipient historySource:
RateLimiter.check_and_recordTest: tests/test_demo_scenarios.pyExact fixture test: tests/test_demo_scenarios.py::test_rate_limit_fixture
.venv/bin/python -m pytest tests/test_demo_scenarios.py::test_rate_limit_fixture -q
Generated fixture