4 messages in ru.sysoev.nginxnginx 0.7 and limit_req
FromSent OnAttachments
Omar KilaniDec 9, 2008 10:35 pm 
Igor SysoevDec 9, 2008 11:31 pm 
Omar KilaniDec 10, 2008 12:27 am 
Igor SysoevDec 10, 2008 2:23 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:nginx 0.7 and limit_reqActions...
From:Omar Kilani (omar@gmail.com)
Date:Dec 9, 2008 10:35:59 pm
List:ru.sysoev.nginx

Hi Igor,

I've recently started using the new limit_req module in nginx 0.7 to try to throttle requests to the API of our web service.

We've been having some issues in that 'delayed' requests seem to be returned with a 503 HTTP response header, but with the correct body (the limit_req is under a 'location' block with proxy_pass).

The configuration is:

limit_req_zone $binary_remote_addr zone=api_one:10m rate=1r/s;

location /services/rest { limit_req zone=api_one burst=5; proxy_pass http://rtm_api; ... }

My intention is to limit requests to an average of 1 request a second, burstable to 5 requests, and supporting delaying requests until they're within that 1 request / second threshold.

Is the 503 response a known issue?

Also, could you tell me how to test this particular configuration to make sure it's correct?

I've tried ab/http_load/siege, etc.

Thanks for your time!

Regards, Omar