

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: DoS
incomplete
2: Rate Limiting
incomplete
3: Protecting Auth from Abuse
incomplete
4: Throttling Requests
incomplete
5: Queuing Work
incomplete
6: Resource Limits
incomplete
7: Timeouts
incomplete
8: Usage Quotas
incomplete
9: DDoS
incomplete
10: Mitigating DDoS
incomplete
11: Bot Detection
incomplete
12: CAPTCHA
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Login and password-reset routes are unauthenticated and expensive, making them natural brute-force and credential-stuffing targets.
Be sure to apply the rate limit before any expensive database work or password verification, so abusive traffic doesn't cause unnecessary load on your servers!
Use both a source limit, like the request's IP, and an account limit, like the username or email being attacked. A source limit slows one caller attacking many accounts, and an account limit protects one account from attackers rotating through different IP addresses.
Don't apply account limits only to known usernames or emails. Different behavior can expose which accounts exist, so rate limit both known and unknown accounts the same way.
Protect login and password-reset requests with both source- and account-based limits.
The local counters remain in memory. Production limits need a trusted proxy configuration and a shared store or edge service.
With Bearly Secure still running, run and submit the CLI tests from the project root.