I
I
Ivan Eliseev2019-07-10 23:11:21
Nginx
Ivan Eliseev, 2019-07-10 23:11:21

How to set a limit for a specific client in nginx?

Hello! A webdav service is organized, via python wscgi, nginx is used as a proxy.
Faced a problem that when clients use Disk0 from mail.ru for connection, the server simply "lays down". A bunch of a bunch of processes are created, as I understand from the logs, the client simply scans the information. There is a lot of information, and such connections simply "lose" the service.
At the moment, I solved the problem radically, by:
if ($http_user_agent ~* CloudDiskO*) {
return 403;
}
But now, actually, a question. Is it possible, through the same if ($http_user_agent ~* CloudDiskO*) directive, to painlessly limit the possible number of connections?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question