all: add configuration to limit max concurrent requests

Currently, there's no upper bound for how many requests that ctrld will
handle at a time. This could be problem on some low capacity routers,
where CPU/RAM is very limited.

This commit adds a configuration to limit how many requests that will be
handled concurrently. The default is 256, which should works well for
most routers (the default concurrent requests of dnsmasq is 150).
This commit is contained in:
Cuong Manh Le
2023-06-16 19:04:30 +07:00
committed by Cuong Manh Le
parent d5e6c7b13f
commit 41139b3343
6 changed files with 63 additions and 9 deletions

View File

@@ -157,6 +157,14 @@ stale cached records (regardless of their TTLs) until upstream comes online.
- Required: no
- Default: false
### max_concurrent_requests
The number of concurrent requests that will be handled, must be a non-negative integer.
Tweaking this value depends on the capacity of your system.
- Type: number
- Required: no
- Default: 256
## Upstream
The `[upstream]` section specifies the DNS upstream servers that `ctrld` will forward DNS requests to.