docs: update project docs for backoff, stale expiry, pool metrics

Add failure backoff and stale expiry sections to USAGE. Document pool=
field in metrics output. Update ROADMAP, TASKS, TODO with completed
items and remaining suggestions. Add metrics example to CHEATSHEET.
This commit is contained in:
user
2026-02-15 15:56:06 +01:00
parent 8aa384a80b
commit eddcc5f615
7 changed files with 36 additions and 3 deletions

View File

@@ -148,6 +148,19 @@ successful health test. This favors freshly-verified proxies over stale ones:
| 30 min | ~0.1 |
| Never tested | 0.01 |
### Failure backoff
When a proxy fails during an actual connection attempt (not just a health
test), its weight is penalized for 60 seconds. The penalty ramps linearly
from floor (0.01) back to normal over that window. This prevents retries
from repeatedly selecting a proxy that just failed.
### Stale proxy expiry
Proxies not returned by any source for 3 consecutive refresh cycles and
not currently alive are automatically evicted. This cleans up proxies
removed upstream faster than waiting for `max_fails` health test failures.
### Persistence
Pool state is saved to `state_file` (default: `~/.cache/s5p/pool.json`) after
@@ -188,7 +201,7 @@ s5p tracks connection metrics and logs a summary every 60 seconds and on
shutdown:
```
metrics: conn=142 ok=98 fail=44 retries=88 active=3 in=1.2M out=4.5M up=0h05m12s
metrics: conn=142 ok=98 fail=44 retries=88 active=3 in=1.2M out=4.5M up=0h05m12s pool=42/65
```
| Counter | Meaning |
@@ -201,6 +214,7 @@ metrics: conn=142 ok=98 fail=44 retries=88 active=3 in=1.2M out=4.5M up=0h05m12s
| `in` | Bytes client -> remote |
| `out` | Bytes remote -> client |
| `up` | Server uptime |
| `pool` | Alive/total proxies (only when pool is active) |
## Profiling