liveBook · Manning

Rate limit

As explained in Grokking Software Architecture

A rate limiter restricts the number or frequency of operations permitted from a client or source during a defined interval.

Rate limiting controls how many requests a client or source can make during a defined interval. It is a server-side defense: it protects an API from aggressive retries, abusive traffic, and requests that could overwhelm the system. section 10.2 section 11.3.1

Enforce limits at the API Gateway, the entry point between external clients and backend services. The gateway can reject excessive requests before they reach services such as authentication, keeping this defense out of core business logic. section 11.3.1

Rate limiting supports perimeter defense in several ways:

  • Drop malicious traffic before it reaches internal services and adds load. section 11.6
  • Combine with other layers, such as a web application firewall and account lockouts, rather than relying on a single defense. section 11.2.2

A login burst

If one IP address attempts to log in 500 times in a minute, the API Gateway can drop those requests before they reach the authentication service. section 11.3.1

How Grokking Software Architecture covers it

How deep it goes
Places enforcement at the API Gateway and illustrates request dropping, but does not specify algorithms or configuration.
Examples
Uses one IP address making 500 login attempts in one minute and gateway defenses against denial-of-service traffic.
What you can do after
Apply rate limiting at an API Gateway to drop excessive requests before they reach backend services.
How it connects
Connects rate limiting to API gateways, defense in depth, web application firewalls, and denial-of-service mitigation.

Also explained in

Compare how 19 books explain rate limit →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.