Limit requests per IP to an expensive handler such as search. Choose the threshold from real usage: an office or mobile network can share one public IP.
You need Правила (Rules), spare capacity, and Ограничить (Limit). Replace example.com with your domain. This example covers GET requests to /search and /api/search, rather than every API endpoint. Rules controls currently retain Russian labels.
Create the limit
- Open WebShield → example.com → Правила → Добавить правило (Add rule). Name it
Search frequency. - Select Ограничить. Set Запросы с одного IP (Requests per IP) to не больше → 20 → в минуту (at most 20 per minute). Set Одновременные запросы (Concurrent requests) to не ограничивать (unlimited).
- Under При превышении (On excess), choose Логировать (Log) if available. It counts excess requests without blocking. Otherwise, conduct a small scheduled test using Блокировать (429) (Block).
- Set Адрес → Равно (Path equals). Use + Несколько значений (Multiple values) to enter
/searchand/api/searchon separate lines. - Add Метод → В списке → GET (Method in list) in the same group. Use your application's actual method for a POST handler.
- Click Сохранить правило (Save rule) and allow synchronization.
Адрес excludes query parameters: /search?q=one and /search?q=two have the same path. Both example paths share this rule's limit for each IP.
Tune the threshold
Test normal search and review Превышений за 24 ч (Excess requests over 24 hours) when logging. Counters may be incomplete. Then select Блокировать (429) and repeat normal usage.
Up to 20 requests may pass initially; capacity then replenishes at an average of 20 per minute. This is not a calendar window. The simulator does not model consumption. Use a limit exception for trusted sources. Distributed requests from different IPs and per-user restrictions also need application controls.