Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Swarm creates all replicas requested at once, in parallel when executing a Replicate On Write (ROW) command for data protection. Objects are safe (replicated on other nodes) using ROW even if a disk failure occurs immediately after a write or update completes.
ROW versus HP for
...
Replication
Without ROW, the Health Processor (HP) manages all replication in the background, the HP checks its replication constraint when writing an object. The HP creates a duplicate of the updated version and deletes the older replicas on the cluster nodes when updating an existing object.
With ROW, Swarm creates another instance of the object on another node immediately, as part of the write. ROW verifies two or more object replicas (instances) exist in the cluster before the client write request is completed. If the object includes a constraint for creating more copies, those additional copies are made during the normal health checking process. While ROW may temporarily restrict client responsiveness as objects are created and replicated at the same time, your objects are protected from a single volume failure right away.
ROW |
---|
Benefits | ROW |
---|
Effects | |
---|---|
|
|
ROW
...
Commands
ROW is enabled by default. ROW-related commands can be issued in these ways:
Configuration | Disable ROW with this setting in node.cfg. (See Settings Reference |
---|
)
| |||||
SNMP | Set |
---|
)
| ||
Query Argument | Use a |
---|
) ROW enabled: To override the cluster defaults, use the query argument with an integer. The most common usage,
ROW |
Disabled: If you have ROW disabled in the cluster, you can achieve ROW by adding the query argument with
|
NoteThe |
Configuration
...
Settings
Following are the configuration settings that control replication for the storage cluster.
...
The replicate query argument serves the same purpose with the similar acceptable values.
policy.replication
Your replication policies (policy.replicas: min:# max:# default:# [anchored]
) and the policy evaluation process affect how Swarm applies ROW. These settings define the baseline range of allowable replicas:
Replication Configured | Effect | Value | Description |
---|---|---|---|
scsp. replicateOnWrite | lower limit | true | false | Swarm starts evaluation with the value of replicateOnWrite: 1 replica if false and 2 replicas if true (the default). |
policy.replicas max | upper limit | min ≤ n ≤ 20 | Swarm determines how many replicas are made for an object and limits the SCSP request to that number. The replication policy |
When the replicate query argument is used, the remaining policy.replication parameters have these effects:
Replication Requested | Meaning | Effect on |
---|
Evaluation | Evaluates to | Description | ||||
---|---|---|---|---|---|---|
replicate=immediate | For use if ROW is disabled in the cluster. Only two replicas must be created before Swarm sends the response; if more replicas are required, those additional replicas are created after the response. | lower limit |
| Only 2 replicas get created synchronously. | ||
replicate=full | For use if ROW is disabled in the cluster. All required replicas must be created before Swarm sends the response. | default value |
| The policy.replicas default evaluated for the object determines the number of replicas Swarm creates synchronously. | ||
replicate={integer} | How many replicas must be created synchronously for this write, overriding cluster settings (within constraints). If policy.replicas max or the lifepoint reps is less than this integer, Swarm uses the smaller of those values.
| default limit | {integer} ≤ | The policy.replicas default evaluated for the object serves as an upper limit on {integer} to determine the number of replicas Swarm creates synchronously. |
...
Note
Neither the replication policy nor the replicate query argument has any effect on erasure-coded objects. Swarm keeps p+1 manifests, up to a limit of ec.maxManifests
for a k:p encoded EC object.
See Configuring Cluster Policies and and Implementing Replication Policy.