DevNet Associate (DEVASC) v1.0Understanding and Using APIsHard

A network administrator is evaluating an API rate limiting policy. The policy allows 100 requests per minute per IP address. If a script makes 20 requests every 10 seconds from a single IP, how many minutes will it take for the script to be rate-limited?

  1. A2 minutes
  2. B1 minute
  3. C5 minutes
  4. D3 minutes
Show answer & explanation

Correct answer: B. 1 minute

The script makes 20 requests every 10 seconds. In one minute (60 seconds), this means 60 / 10 * 20 = 6 * 20 = 120 requests. Since the limit is 100 requests per minute, the script will exceed the limit within the first minute.

Why the other options are wrong

  • A. This would imply the script is within limits for the first minute, which is incorrect.
  • C. This would imply the script is within limits for the first four minutes, which is incorrect.
  • D. This would imply the script is within limits for the first two minutes, which is incorrect.

API Rate Limit Calculation

Determining when an API client will exceed a defined request limit within a specific time window.

  • Convert all time units to be consistent (e.g., seconds to minutes).
  • Calculate total requests within the rate limit window.
  • Compare total requests to the allowed limit.

Memory trick: Rate Limits: Calculate Fast, Or Get Blocked Quickly.

More Understanding and Using APIs questions