0.8.0 (2026-04-06)
🇷🇺 Release notes (RU)
Проблемы, которые решает этот релиз
- При неоптимальных конфигурациях (завышенный
max_connections, отсутствие rate-limit'а) могли не грузиться сториз и другие медиа — прокси уходил в перегрузку и не справлялся с relay-сессиями. - CPU мог очень жёстко утилизироваться из-за accept/close spin-loop'ов при насыщении пула соединений, особенно на 1 vCPU хостах.
Что добавлено и улучшено
- Admission control с гистерезисом: при достижении ≥90% от
max_connectionsпрокси приостанавливает приём новых соединений наlisten_fdи возобновляет только при падении ниже 80%. Это убирает spin-loop'ы при перегрузке. - Бюджет параллельных handshake'ов: одновременные handshake'и ограничены до 30% от
max_connections. Сканеры и DPI-пробы больше не вытесняют активные relay-сессии. - Per-/24 subnet rate limiting: zero-allocation token bucket ограничивает новые соединения с одной /24 (IPv4) или /48 (IPv6) подсети — по умолчанию до 8 conn/sec. Настраивается через
rate_limit_per_subnet. - Авто-клэмпинг
max_connectionsпо RAM: при старте прокси автоматически ограничиваетmax_connectionsбезопасным значением на основе доступной оперативной памяти. Можно отключить черезunsafe_override_limits = true. - Метрики деградации: 6 новых счётчиков в периодическом логе статистики:
cap— достигнутmax_connectionssat— отброшено из-за saturation overriderate— сработал subnet rate limiths_budget— превышен лимит параллельных handshake'овhs_timeout— таймаут handshake'аmp_fallback— fallback с MiddleProxy на direct
Важно
- Если ранее у вас были проблемы с загрузкой сториз или высокой утилизацией CPU — обновление до 0.8.0 должно решить эти проблемы без ручного тюнинга конфигурации.
- Авто-клэмпинг подберёт безопасные лимиты автоматически. Если вы уверены в своих значениях — используйте
unsafe_override_limits = true.
🇬🇧 Release notes (EN)
Problems addressed in this release
- With non-optimal configurations (inflated
max_connections, no rate limiting), stories and other media could fail to load — the proxy would become overloaded and unable to sustain relay sessions. - CPU could spike extremely hard due to accept/close spin loops when the connection pool was saturated, especially on 1 vCPU hosts.
What's new and improved
- Admission control with hysteresis: when active connections reach ≥90% of
max_connections, the proxy pauses accepting new connections onlisten_fdand resumes only when they drop below 80%. This eliminates spin loops under saturation. - Handshake inflight budget: concurrent handshakes are capped at 30% of
max_connections. Scanner floods and DPI probes no longer evict active relay sessions. - Per-/24 subnet rate limiting: a zero-allocation token bucket limits new connections per /24 (IPv4) or /48 (IPv6) subnet — default: 8 conn/sec. Configurable via
rate_limit_per_subnet. - Auto-clamping
max_connectionsby RAM: at startup, the proxy automatically clampsmax_connectionsto a RAM-safe estimate. Can be bypassed withunsafe_override_limits = true. - Degradation metrics: 6 new counters in the periodic stats log:
cap— reachedmax_connectionssat— dropped due to saturation overriderate— hit per-subnet rate limiths_budget— hit handshakes inflight limiths_timeout— handshake timeout reachedmp_fallback— MiddleProxy fallback to direct triggered
Important
- If you previously experienced issues with stories not loading or high CPU utilization — upgrading to 0.8.0 should resolve these problems without manual config tuning.
- Auto-clamping will pick safe limits automatically. If you are confident in your values, use
unsafe_override_limits = true.
Recommended VPS presets (starting points)
| Profile | max_connections
| idle_timeout_sec
| handshake_timeout_sec
| rate_limit_per_subnet
| Notes |
|---|---|---|---|---|---|
| 1 vCPU / 1 GB | 512 | 120 | 15 | 8 | Auto-clamped by default |
| 2 vCPU / 2 GB | 1024 | 120 | 15 | 8 | Good for mixed traffic |
| 4 vCPU / 4 GB | 1536–2048 | 120 | 15 | 8 | Raise gradually and monitor |
| 8 vCPU / 8 GB | 2048–3072 (per instance) | 120 | 15 | 8 | Prefer 2+ instances |
Tuning guidance / Рекомендации по тюнингу
- Start from the profile above, then increase
max_connectionsin +15–25% steps. - Monitor:
conn stats, reconnect/error rate, and sustained CPU. - If stories or media fail under load — your
max_connectionsis likely too high for the host; let auto-clamp handle it or reduce manually. - If new clients intermittently fail under churn, reduce
max_connectionsby ~20%.
Features
This PR is managed by Release Please.