How to Implement Rate Limiting in Express for Node.js

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • nodejs-rate-limiting-demo

  • You now have to ensure that the Node.js server slows down incoming requests as desired. Start your local server by following the steps above, or check out the express-slow-down branch of the GitHub repository that backs this tutorial:

  • express-rate-limit

    Basic rate-limiting middleware for the Express web server

  • express-rate-limit is an npm library that provides a rate limiting middleware for Express, so it's easier to limit repeated requests to all APIs or only to specific endpoints. The middleware allows you to control how many requests the same user can make to the same endpoints before an application starts returning 429 Too Many Requests errors.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • ratelimit-headers

    Repository for IETF WG draft ratelimit-headers

  • standardHeaders: To enable support for the RateLimit headers recommended by the IETF. The default value is false.

  • express-slow-down

    Slow down repeated requests; use as an alternative (or addition) to express-rate-limit

  • express-slow-down provides a rate limiting middleware built on top of express-rate-limit. Instead of blocking requests outright, express-slow-down slows down the processing of incoming requests that exceed defined limits.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts