Reader small image

You're reading from  Defending APIs

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781804617120
Edition1st Edition
Right arrow
Author (1)
Colin Domoney
Colin Domoney
author image
Colin Domoney

Colin Domoney (BSc. MSc. CSSLP, CEH) is an API Security Research Specialist and Developer Advocate with deep expertise in the development of secure software. As VP of AppSec, he took on the challenge of securing software on a large scale and running the global AppSec program at Deutsche Bank. At Veracode, as an evangelist, he produces countless webinars, and blog posts, and speak globally at conferences. Currently, he has embraced the challenge of securing APIs with 42Crunch where he has produced the API industry's first security maturity model and contributed to numerous webinars, talks, and blogs. Currently, he is working on the industry's first defensive API developer training course. He is also the curator of the APISecurity weekly newsletter.
Read more about Colin Domoney

Right arrow

Protecting against unrestricted resource consumption

The primary way to protect against the overuse of API resources is to implement rate limiting and throttling on your APIs. API rate limiting monitors the access to an API endpoint for a given client (usually based on IP address) and checks to see whether a predetermined allowed number of accesses has been made within a given window. If so, then the client will be rate-limited, typically with 429 Too Many Requests. The client will have the option to back off and retry the request or fail outright.

The server uses several different algorithms to detect the rate-limiting threshold, and some may be quite adaptive to only trigger in extreme cases of abuse. For example, the server can block many requests over a wide window or may only block on very high peak demands (or bursts) of access. The choice will depend on the perceived threats to the API, for example, denial-of-service attacks or mass data exfiltration.

Rate limiting can...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Defending APIs
Published in: Feb 2024Publisher: PacktISBN-13: 9781804617120

Author (1)

author image
Colin Domoney

Colin Domoney (BSc. MSc. CSSLP, CEH) is an API Security Research Specialist and Developer Advocate with deep expertise in the development of secure software. As VP of AppSec, he took on the challenge of securing software on a large scale and running the global AppSec program at Deutsche Bank. At Veracode, as an evangelist, he produces countless webinars, and blog posts, and speak globally at conferences. Currently, he has embraced the challenge of securing APIs with 42Crunch where he has produced the API industry's first security maturity model and contributed to numerous webinars, talks, and blogs. Currently, he is working on the industry's first defensive API developer training course. He is also the curator of the APISecurity weekly newsletter.
Read more about Colin Domoney