openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #11106
Re: [Swift][Keystone] Swift Quotas
On Tue, 01 May 2012, Everett Toews wrote:
> 2. Where should the code for Swift quotas live?
>
> It was suggested during the session that this code could live in a
> middleware for Swift. Seems like a reasonable approach to me. I've taken a
> look at some of the code in /swift/common/middleware and it looks
> relatively straight-forward. Any thoughts or suggestions on implementing
> this as middleware?
I think a quota implementation should be split into two separate
middleware pieces; one for quota discovery and one for quota enforcement.
The discovery middleware could place the quota settings for a given tenant
into a set of X-Quota-* headers. The enforcement middleware would then
check for any existing X-Quota-* headers and take action if they were
present. This would allow a deployment to use a custom authentication
system or a new quota enforcement method more easily than if it were
combined in a single middleware.
Thanks,
Doug
Follow ups
References