Beginning with Swarm Storage 6.0, you can create unnamed objects in a domain and apply the domain's protection settings to those objects. This allows unnamed objects to be accounted for in metered environments where storage may be allocated to a set of users based on the domain into which their content is stored. An object's association with a domain is called tenancy. However, the domain is not used to later locate the unnamed object in the cluster as is the case for named objects.
An SCSP WRITE of an unnamed object to be associated with a domain is formatted using the following syntax:
POST /?domain=domain-name[&alias] POST /[?alias] Host: domain-name
Important
When writing unnamed objects, use a HOST header equivalent to the cluster name, the host IP address, or a domain=clusterName query argument on all requests even if you are not using domains for other purposes.
Caution
When writing unnamed objects, ensure that your application is not passing a HOST header that is neither an IP address nor a domain that exists in the cluster (unless the host header matches the cluster name). Swarm will attempt to look up the non-existent domain on every request and will wait for multiple retries before the lookup times out, impacting performance.
The alias query argument is required to create an alias object. Omit the alias query argument to create an immutable object.
The following table summarizes the differences with unnamed objects and domains in version 6.0 and later compared to earlier ones:
Unnamed Behavior in Version 6.0+ | Behavior in Earlier Versions |
---|---|
An unnamed object can be created in a domain (but not in a bucket). An unnamed object created in version 6.0 and later is associated with a domain only if the object is explicitly associated with a domain using either the domain= query argument or a host header. If the configuration parameter cluster.enforceTenancy is set to false (default) and either a domain is not specified, the default domain is specified, or a domain that does not exist is specified on the POST using either the domain= query arguments or the host header, then the object is not associated with a domain. You cannot write unnamed streams into the default domain unless cluster.enforceTenancy=True If the configuration parameter cluster.enforceTenancy is set to true and an alternate domain is not specified on the POST request, then the object is associated with the default cluster-name domain. With cluster.enforceTenancy set to true, specifying a domain that does not exist on the POST request will result in a 412 response. | Unnamed objects were always untenanted (not associated with any domain). |
Whether unnamed objects are permitted in a particular domain is determined by the protection settings created in the domain, including the default domain. If unnamed objects are not associated with a domain, there are no POST restrictions. | Whether unnamed objects POSTs were allowed was always determined by the protection settings of the default cluster domain. |