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.
This commit is contained in:
parent
9d29321806
commit
0468781a69
5 changed files with 54 additions and 6 deletions
3
BACKLOG.md
Normal file
3
BACKLOG.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
- remove the CLI options, everything should be only configurable via config file
|
||||
- seperate tests into unit/integration and system tests, at least by naming convention, but perhaps there is a rust way to do it
|
||||
- add a system test which tests that the server really responds with 44 before 41
|
||||
Loading…
Add table
Add a link
Reference in a new issue