350-201 · Question #83
An API developer is improving an application code to prevent DDoS attacks. The solution needs to accommodate instances of a large number of API requests coming for legitimate purposes from…
The correct answer is D. Apply a limit to the number of requests in a given time interval for each API. If the rate is. Rate limiting requests per API within a defined time interval is the standard mechanism to defend against DDoS while still accommodating legitimate high-volume traffic from trusted services.
Question
An API developer is improving an application code to prevent DDoS attacks. The solution needs to accommodate instances of a large number of API requests coming for legitimate purposes from trustworthy services. Which solution should be implemented?
Options
- ARestrict the number of requests based on a calculation of daily averages. If the limit is exceeded,
- BImplement REST API Security Essentials solution to automatically mitigate limit exhaustion. If the
- CIncrease a limit of replies in a given interval for each API. If the limit is exceeded, block access
- DApply a limit to the number of requests in a given time interval for each API. If the rate is
How the community answered
(59 responses)- A8% (5)
- B15% (9)
- C3% (2)
- D73% (43)
Why each option
Rate limiting requests per API within a defined time interval is the standard mechanism to defend against DDoS while still accommodating legitimate high-volume traffic from trusted services.
Calculating limits based on daily averages does not account for legitimate short-term bursts from trusted services and can incorrectly block valid traffic during peak periods while missing rapid DDoS spikes.
REST API Security Essentials is not a specific recognized standard or product for automated rate limiting, and this option does not address the requirement to accommodate legitimate high-volume requests from trustworthy services.
Increasing the reply limit for each API without a per-interval rate control simply raises the ceiling for abuse without providing real-time protection against DDoS traffic patterns.
Rate limiting applies a configurable threshold on requests per API per time interval, allowing legitimate high-volume bursts from trusted services up to the defined limit while automatically blocking or throttling traffic that exceeds it. This approach is more flexible than daily averages because it responds to real-time traffic spikes and can be tuned per API based on expected legitimate load patterns. Blocking or throttling access only when the rate is exceeded ensures that high-volume trusted partners are not impacted during normal operating periods.
Concept tested: API rate limiting for DDoS protection
Source: https://owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption/
Topics
Community Discussion
No community discussion yet for this question.