What is rate limiting and how do you apply it?

REST API design and errors · Experienced

Model answer

Rate limiting caps how many requests a client can make in a time window to protect against abuse and brute force. In Express use express-rate-limit, with stricter limits on login and password reset routes. For several servers, store counters in Redis. Return 429 with a Retry-After header, and identify clients correctly behind a proxy.

Learn this topic

Build a REST API: Create, Read, Update and Delete Tasks in the course Node.js and Express: Build a Back End API from Scratch.

Sign in to add your own answer.

More questions