Working with Metadata
There are two kinds of object metadata in QStorage: system-defined metadata and user-defined metadata. System-defined metadata includes metadata such as the object's creation date and size. User-defined metadata is metadata that you can choose to set at the time that you upload an object.
When you create an object, you specify the object key (or key name), which uniquely identifies the object in a QStorage bucket. You can also set user-defined metadata in QStorage at the time that you upload the object.
After you upload the object, you can't modify this user-defined metadata. The only way to modify this metadata is to make a copy of the object and set the metadata.
System-defined Object Metadata
For each object stored in a bucket, QStorage maintains a set of system metadata. QStorage processes this system metadata as needed. For example, QStorage maintains object-creation date and size metadata, using this information as part of object management.
Billing and Metadata
When considering how QStorage handles billing, it's important to understand how metadata affects storage costs:
-
Storage Billing: QStorage bills for the total storage used by your objects, which includes both the object data itself and its metadata. However, the billing is primarily based on the total data size of all objects rather than tracking each object individually.
-
Metadata Size: While metadata is relatively small compared to object content, it does contribute to the overall storage size. User-defined metadata can be up to 2 KB per object, which is included in your storage calculations.
-
System Metadata Impact: System metadata is necessary for object management and is included in the storage calculations, but typically has minimal impact on overall billing.
-
Granularity: Billing is calculated based on the aggregate storage used across all objects in your buckets, not on a per-object basis. This means QStorage tracks the total storage consumption rather than billing for each object individually.
For specific details about current billing rates and how storage is calculated, please refer to the QStorage pricing documentation.
There are two categories of system metadata:
- System controlled – Metadata such as the object-creation date is system controlled, which means that only QStorage can modify the value.
- User controlled – Other system metadata, e.g. whether the object is public or not, are examples of system metadata whose values you control.
When you create objects, you can configure the values of these system metadata items or update the values when you need to.