

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
Rate limits cap short-window activity, like "10 requests per minute," while quotas cap sustained usage, like "1,000 exports per month." The first protects your server from being overwhelmed right now; the second limits cost and abuse over time.
Modern web apps often trigger expensive work behind the scenes: sending emails, generating PDFs, calling third-party APIs, running AI inference, or processing payments. Quotas simply put a ceiling on that cost.
Good candidates include email sends, SMS messages, AI completions, image generation, and report exports. They're either expensive per unit or abusable at volume... but usually both.
Checking the quota and incrementing usage must be atomic. If you read first and write later, concurrent requests can all spend the same last remaining unit.
The warehouse integration can use its API key without a long-term ceiling.
Enforce the prebuilt daily quota.
With Bearly Secure still running, run and submit the CLI tests from the project root.