Implement a rate-limiting algorithm to protect a public-facing API gateway from denial-of-service attacks.