Q
Operations
Quotas & Tiers
Per-project daily byte/event caps + per-second burst limit. ETS-backed.
▸ How it works
Every project has a tier (`developer`, `team`, `business`, `enterprise`). Tiers define daily byte and event quotas plus a per-second burst capacity. The pipeline checks `Quotas.check_burst/2` (token bucket) and `Quotas.check_ingest/2` (daily counter) on every request. Counters are `:counters`-backed for lock-free atomic increment, flushed to Postgres every second. Over-quota returns `429` with a machine-readable JSON body.
▸ What this lets you do
- ✓ Protect the platform from a single noisy project DoS'ing the rest
- ✓ Each customer sees their own limits in the Quotas page
- ✓ Upgrade flow built-in — change tier in admin, takes effect on next request
- ✓ Burst-rate-limit headers (`X-RateLimit-Remaining`, `Retry-After`)
▸ Get it running
- 1 Defaults to `developer` tier on project creation
- 2 Upgrade via the admin tier picker on the project settings page
- 3 Inspect live usage at `/app/p/:org/:project/quotas`
▸ Code examples
tier daily_events daily_bytes burst/s burst_cap
developer 1 M 5 GB 500 5 000
team 50 M 250 GB 5 000 50 000
business 500 M 2.5 TB 25 000 250 000
enterprise unlimited unlimited 100 000 1 000 000
Where to find it
/app/p/:org/:project/quotas