add rate limiting per engine

This commit is contained in:
Marc Abonce Seguin
2022-04-24 23:52:13 -05:00
parent 666cd1f635
commit 85eca4fb22
8 changed files with 90 additions and 8 deletions

View File

@@ -473,6 +473,9 @@ engine is shown. Most of the options have a default value or even are optional.
max_connections: 100
max_keepalive_connections: 10
keepalive_expiry: 5.0
rate_limit:
- max_requests: 200
interval: 60
proxies:
http:
- http://proxy1:8080
@@ -545,6 +548,15 @@ engine is shown. Most of the options have a default value or even are optional.
- ``ipv4`` set ``local_addresses`` to ``0.0.0.0`` (use only IPv4 local addresses)
- ``ipv6`` set ``local_addresses`` to ``::`` (use only IPv6 local addresses)
``rate_limit``: optional
Limit how many outgoing requests is SearXNG going to send to the engines.
It is a list where each element has:
- ``max_requests`` is the maximum number of requests that will be sent to this
engine per interval.
- ``interval`` (optional) is the number of seconds before this engine's rate
limiter is reset. Defaults to 1 second if unspecified.
.. note::
A few more options are possible, but they are pretty specific to some