Steve Yegge
c71da4c267
Add resource limits to daemon (bd-152)
Implemented connection limiting, request timeouts, and memory pressure detection:
- Connection limiting with semaphore pattern (default 100 max connections)
- Request timeout enforcement on read/write (default 30s)
- Memory pressure detection with aggressive cache eviction (default 500MB threshold)
- Configurable via environment variables:
- BEADS_DAEMON_MAX_CONNS
- BEADS_DAEMON_REQUEST_TIMEOUT
- BEADS_DAEMON_MEMORY_THRESHOLD_MB
- Health endpoint now exposes active/max connections and memory usage
- Comprehensive test coverage for all limits
This prevents resource exhaustion under heavy load or attack scenarios.
Amp-Thread-ID: https://ampcode.com/threads/T-44d1817a-3709-4f1d-a27a-78bb2fa4d3dc
Co-authored-by: Amp <amp@ampcode.com>
2025-10-19 13:22:23 -07:00
..
2025-10-16 17:43:38 -07:00
2025-10-19 13:22:23 -07:00
2025-10-19 09:00:11 -07:00
2025-10-17 13:50:20 -07:00