We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Usage Quotas

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.

Assignment

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.