[openstack-dev] [Swift] domain-level quotas

Christian Schwede christian.schwede at enovance.com
Wed Jan 22 21:47:24 UTC 2014

Hi Matthieu,

Am 22.01.14 20:02, schrieb Matthieu Huin:
> The idea is to have a middleware checking a domain's current usage
> against a limit set in the configuration before allowing an upload.
> The domain id can be extracted from the token, then used to query
> keystone for a list of projects belonging to the domain. Swift would
> then compute the domain usage in a similar fashion as the way it is
> currently done for accounts, and proceed from there.

the problem might be to compute the current usage of all accounts within
a domain. It won't be a problem if you have only a few accounts in a
domain, but with tens, hundreds or even thousands accounts in a domain
there will be a performance impact because you need to iterate over all
accounts (doing a HEAD on every account) and sum up the total usage.

I think some performance tests would be helpful (doing a HEAD on all
accounts repeatedly with some PUTs in-between) to see if the performance
impact is an issue at all (since there will be a lot of caching involved).


More information about the OpenStack-dev mailing list