object-api/v1/section_object-api-containe...

51 lines
2.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section [
<!-- Useful for describing APIs -->
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
<!ENTITY HEAD '<command xmlns="http://docbook.org/ns/docbook">HEAD</command>'>
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>
]>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook" version="5.0"
xml:id="container-quotas">
<title>Container quotas</title>
<para>You can set quotas on the size and number of objects stored
in a container by setting the following metadata:</para>
<itemizedlist>
<listitem>
<para><literal>X-Container-Meta-Quota-Bytes</literal>. The
size, in bytes, of objects that can be stored in a
container.</para>
</listitem>
<listitem>
<para><literal>X-Container-Meta-Quota-Count</literal>. The
number of objects that can be stored in a container.</para>
</listitem>
</itemizedlist>
<para>When you exceed a container quota, subsequent requests to
create objects fail with a <errorcode>413</errorcode>
<errortext>Request Entity Too Large</errortext> error.</para>
<para>The Object Storage system uses an <emphasis role="italic"
>eventual consistency</emphasis> model. When you create a
new object, the container size and object count might not be
immediately updated. Consequently, you might be allowed to
create objects even though you have actually exceeded the
quota.</para>
<para>At some later time, the system updates the container size
and object count to the actual values. At this time,
subsequent requests fails. In addition, if you are currently
under the <literal>X-Container-Meta-Quota-Bytes</literal>
limit and a request uses chunked transfer encoding, the system
cannot know if the request will exceed the quota so the system
allows the request. However, once the quota is exceeded, any
subsequent uploads that use chunked transfer encoding
fail.</para>
</section>