Proposal: Introduce per-account storage quotas
Is your feature request related to a problem? Please describe.
With spaces becoming available, more and more apps will try to use their PDS as unlimited storage (see my example ATStorage), so I think account-wide quotas should be introduced, even if by default (or for now) it's set to unlimited.
Describe the solution you'd like
This raises some questions, though, on what should be limited, these are the options I could think of:
- Account quota
- Account quota with collection whitelisting ⬆️ these two would prevent even posting text, which I think is not ideal
- Blobs quota
- Blobs quota with collection whitelisting (similar to above, if a blob is referenced by a record from a whitelisted collection, it's not counted towards the quota. Easy to bypass, though, I guess)
Describe alternatives you've considered
In my opinion the ideal choice is a quota that affects blobs only, with optional whitelisting (for example, as an application that operates their own PDS I might want to give my users unlimited storage, but not want them to use that storage with other apps). This would mean including a totalBlobUploadLimit in the server config, and use it in uploadBlobAndGetMetadata. This would also mean adding some way to warn the user when reaching the limits, and maybe? providing a way to clear storage, but that could be delegated to the PDS operator.
These new limit and whitelist settings should be exposed through describeServer like https://github.com/bluesky-social/atproto/pull/5277
Additional context
Happy to discuss more options/ideas
Source: bluesky-social/atproto