learn hapi — Rate Limits for Routes (Part 2 of 7)

In the first tutorial, you built an IP based rate limiter. The rate limiter stores the client-related details in Redis. Your setup includes the configuration for global rate limits that apply to each incoming request.

In this tutorial, you’ll implement the logic to support individual rate limits for each route in your application. You’ll keep the global rate limit settings and may override the settings on a route, e.g. the login or sign up.

If you don’t want to code along, find the package on GitHub in the hapi-rate-limitor repository and on NPM at hapi-rate-limitor. Have a look!

hapi Series Overview

  1. JWT Refresh Token for Multiple Devices (Coming soon)
  2. Check Refresh Token in Authentication Strategy (Coming soon)
  3. Rate Limit Your Refresh Token API Endpoint (Coming soon)

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.