Commit graph

4 commits

Author SHA1 Message Date
13acdd9bcb Mark graceful config validation as completed in BACKLOG.md 2026-01-16 22:22:03 +00:00
6c6d4bc613 Update BACKLOG.md - all items completed 2026-01-16 11:48:17 +00:00
33ae576b25 Implement rate limiting with 41 responses and comprehensive logging
- Add concurrent connection handling with tokio::spawn for proper rate limiting
- Send '41 Server unavailable' responses instead of dropping connections
- Move request logger initialization earlier to enable rate limiting logs
- Add logging for rate limited requests: 'Concurrent request limit exceeded'
- Fix clippy warnings: needless borrows and match simplification
- Update test script analysis to expect 41 responses for rate limiting
2026-01-16 06:00:18 +00:00
0468781a69 Add configurable global concurrent request limiting
- Add max_concurrent_requests config option (default: 1000)
- Implement global AtomicUsize counter for concurrent request tracking
- Return status 41 'Server unavailable' when limit exceeded
- Proper counter management with decrements on all exit paths
- Add comprehensive config validation (1-1,000,000 range)
- Update documentation with rate limiting details
- Add unit tests for config parsing
- Thread-safe implementation using Ordering::Relaxed

This provides effective DDoS protection by limiting concurrent
connections to prevent server overload while maintaining
configurability for different deployment scenarios.
2026-01-16 02:26:59 +00:00