Is it possible to limit replication on OpenStack Swift to one or possibly 2? 3 data replicas are currently being created.
1 Answers
The default replication in Swift is 3 replicas, but you can change that to any number greater or equal to 1. The swift-ring-builder command has a set-replicas
verb for adjusting the number of replicas; see
Of course, there is a tradeoff between the number of replicas and your cluster's ability to cope with loss of disk drives and servers.
You also asked this:
If I don't want replication on Openstack Swift(replication equal to 1), can I achieve this by disabling replicators? sudo swift-init object-replicator stop If I may, is this a better option?
I guess it would probably work ... until someone or something restarts the replicators.
But it is not a good idea:
Monitoring may complain that the replicators are not working(!)
Other swift tools may complain that the cluster is out of spec; e.g.
swift-recon --replication
.If you have been previously running with (say) a 3 replica policy, then nothing will delete the (now) redundant replicas created before you turned off the replicators.

- 698,415
- 94
- 811
- 1,216
-
If I don't want replication on Openstack Swift(replication equal to 1), can I achieve this by disabling replicators? `sudo swift-init object-replicator stop` If I may, is this a better option? – kojders Mar 16 '22 at 13:28