Table of Contents |
---|
The Replicate on Write (ROW) option forces Swarm to write a new object to one or more additional nodes before returning a success status. Using this content protection option, you can ensure that two or more object replicas (instances) exist in the cluster before the client write request is completed.
...
These are the success conditions for a ROW request:
A POST on an immutable object creates at least two replicas.
Any write operation for an alias object, or a POST for a named object.
Info | |
---|---|
title | NoteThe reason for treating named objects like existing alias objects is thatthey mightmay already exist. Allowing these writes to succeed with one replica ensures thatverifies no old versions can be inadvertently deleted by the HP shouldif the request failfails with onlyone replica. |
Implementing ROW
You implement Implement ROW in these ways:
Globally, set the configuration file to enabling (recommended) or disabling cluster-wide ROW.
Programmatically, use a replicate query argument whenever you need to override the cluster-wide ROW configuration.
Creating or updating a bucket. The replicate=immediate option quickly invalidates cached bucket versions in the cluster so that the latest version will be implemented in the cluster. It also prevents subsequent permission errors because out-of-date permissions are used from the prior version.
Code Block | ||
---|---|---|
| ||
curl -i --post301 --data-binary '' --location-trusted 'http://172.16.0.35/bucket?domain=test.example.com&replicate=immediate' -D create-bucket.log |
replicate argument
To Add the replicate query argument to control how Swarm implements ROW on a given request, add the replicate query argument.If .
Use this argument to limit or disable ROW for the request if you have cluster-wide ROW enabled (recommended), use this argument to limit or disable ROW for the request:
replicate=x (where x is an integer) creates x replicas on write. For example, replicate=1 allows the write to succeed with only one instance of the object.
If you have cluster-wide ROW disabled , use Use these arguments to enable ROW for the request tf you have cluster-wide ROW disabled:
replicate=immediate is replicate=2, which ensures that two replicas are written.
replicate=full is replicate={# of reps specified by lifepoint, or else
policy.replicas default
}
In every case, the number of replicas Swarm makes synchronously on the request cannot exceed the number of replicas specified in the lifepoint (or, if none, policy.replicas default
). For example, for an object with no lifepoint specified, in a cluster with default=2, making a request with replicate=3 will still only cause 2 replicas to be synchronously created on the request.
...