Lesson 3.2

Rate limiting

Rate limiting protects you from clients and clients from themselves. Token bucket is the usual answer; the hard part is the key you limit on.

Duration
8m
Level
Intermediate
Students
9.4k students

Overview

Rate limiting protects you from clients and clients from themselves. Token bucket is the usual answer; the hard part is the key you limit on.

In this lesson you will:

  • Implement token bucket and sliding window limits
  • Choose the right key: user, tenant, or IP
  • Return limits and retry hints in the response

Resources

AWS Architecture Center

The official reference for the tools used in this lesson.