Loading Depth Study
Preparing your workspace
Rate limiting restricts how frequently a client can perform certain actions within a defined period.
Some endpoints are more sensitive to abuse than others. Login, password reset, OTP, search, and expensive report endpoints can require stricter limits. Rate limits may be based on IP address, user identity, API key, account, or a combination. Good systems also consider distributed deployments, trusted proxies, retry behavior, and user experience. Rate limiting is one layer of protection and should work alongside authentication, validation, monitoring, and abuse detection.
A login endpoint can limit repeated failed attempts while still allowing normal students to log in without unnecessary friction.
POST /api/auth/login HTTP/1.1 429 Too Many Requests Retry-After: 60
The server tells the client that too many requests were made and when it may try again.