I am trying to limit the number of connections to my server from a
single IP address using the limit_zone module as described on the wiki
, but nginx is not sending a 503 to the client as expected.
In the past I have used apache’s mod_limitipconn to limit the number of
simultaneous connections to 20 from a single IP address. I have tried to
duplicate that behaviour with nginx.
Attached is the output of `ab’ , which is what I am using to generate
the requests. When testing against apache, I see many failed requests,
which the logs show as a returned 503. However, when using nginx, all
the requests are returned with a 200. The logs show zero 503 replies
Attached is the ab output for both tests and my nginx.conf.
The configuration seems quite simple, so I am surprised that it doesn’t
work. Anybody see any errors on my part?