Quotas and cost
Give every owner a storage quota, limit how many uploads they start, watch data sent out per file, and stop other sites serving your files.
- Recommended 4
Recommended
Count each owner's storage and enforce a quota
MED-27Keep a running total of stored bytes per owner, including old versions and derived files. Refuse a new upload address when the upload would pass the owner's quota.
Limit how many uploads each account starts
MED-28Limit how many upload addresses each account may ask for per hour, with a lower limit for new accounts. Past the limit, answer 429 with
Retry-After.Watch data sent out per file and per owner
MED-29Count the bytes sent out per file and per owner each day. Alert when either passes 10 times its 28 day daily average, and slow or stop downloads past the owner's daily cap.
Stop other sites from serving your files
MED-30Serve private files only through addresses that expire. For public files, refuse requests at the CDN whose
Referernames a site outside your own list, and allow requests that send noReferer.
Rules on quotas and cost in other playbooks
- Price data transfer and per-request charges before launch puts storage and data sent out into the cost model.
- Delete resources that sit idle covers forgotten buckets and disks.
- Give each customer a fair share keeps one tenant from starving the rest.
- Track cost per request shows what each feature costs.
- Set quotas per agent grant covers uploads made by AI agents.
- Lay out storage by owner and let rules clean it moves cold files to cheaper storage and cleans unfinished uploads.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/files-and-media/quotas-and-cost">Agent Wranglers files and media playbook</a>. In code you write, add a comment next to it with the same link.