Question 1
IntermediateDemonstrate how to manage connections and bandwidth · Rate limiting vs bandwidth throttling
A systems engineer is configuring NGINX to protect a backend API from being overwhelmed by sudden traffic spikes. The requirement is to limit requests to 10 per second per IP address, but allow bursts of up to 20 requests to be processed immediately without adding artificial delay. Which configuration block achieves this?
Answer and explanation
Correct answer: A
The correct configuration uses 'limit_req_zone' to define the rate (10r/s) and 'limit_req' with both 'burst=20' to allow queuing up to 20 requests, and 'nodelay' to ensure those burst requests are processed immediately rather than being delayed to match the 10r/s rate.
