Enable Active-Active Bucket Replication
The procedure on this page creates a new bucket replication rule for two-way “active-active” synchronization of objects between AIStor buckets.
Requirements
Replication requires all participating clusters meet the bucket replication requirements. This procedure assumes you have reviewed and validated those requirements.
Configure Replication Using the MinIO Console
These steps configure bucket replication in one direction (A -> B)
-
Log in to the MinIO Console for the source deployment.
-
Select the Manage button for the bucket to replicate.
-
Select the Replication section.
-
Select Add Replication Rule +.
-
Complete the requested information:
Field Description Priority Enter a number value to indicate the order in which to process replication rules for the bucket.
1 indicates the highest importance.Target URL The URL of the deployment to replicate data to. Use TLS Leave the toggle in the ON position if the destination deployment uses TLS.
Otherwise, move the toggle to the OFF position.Access Key The user name to use on the destination deployment.
The user must have write access to the bucket to replicate to.Secret Key The password for the provided Access Key. Target Bucket The bucket at the destination to write the data to.
The target bucket may have the same name as the origin bucket, depending on the destination bucket location.Region The AWS resource region location of the destination deployment. Replication mode Leave the default selection of Asynchronous to allow AIStor to replicate data after the write operation completes on the origin.
Select Synchronous to attempt to complete the replication of the object during its write operation.
While synchronous replication may result in more reliable synchronization between the origin and destination buckets, it may also increase the time of each write operation.Bandwidth Specify the maximum amount of bandwidth the replication process can use while replicating data.
Enter a number and select a data unit.Health Check Duration The maximum length of time in seconds AIStor should spend verifying the health of the replicated data on the destination bucket. Storage Class The class of storage to use on the destination deployment for the replicated data.
Valid values are eitherSTANDARD
orREDUCED_REDUNDANCY
.Object Filters Limit which objects to replicate from the bucket by prefix or tags.
If you enter multiple tags, the objects must match all tag values.Metadata Sync Leave selected to also replicate the object’s metadata file.
Otherwise, move the toggle to the Off position.Delete Markers Leave selected to also replicate AIStor’s indication that an object has been deleted and should also be marked deleted at the action bucket.
Otherwise, move the toggle to the Off position to prevent marking the object as deleted in the destination bucket.Deletes Leave selected to allow replication of the deletion of versions of an object.
Otherwise, move the toggle to the Off position to not replicate deletion of object versions. -
Select Save to finish adding the replication rule.
Repeat the above steps to create matching rules in the reverse direction (B -> A) Use the Console for the destination deployment used above.
To validate the configuration, upload an object to the bucket on the source deployment. Then check the bucket on the remote deployment and ensure the object replicates successfully.
mc
Configure Replication Using the Command Line -
Create a rule from one AIStor deployment to the remote participant.
Use the
mc replicate add
command to add a new replication rule to the first AIStor deployment.mc replicate add ALIAS/BUCKET \ --remote-bucket 'https://USER:PASSWORD@HOSTNAME:PORT/BUCKET' \ --replicate "delete,delete-marker,existing-objects"
- Specify the ALIAS and Bucket of the first AIStor deployment.
- Modify the
--remote-bucket
parameters to specify the remote AIStor deployment and bucket.
Once saved the replication rule synchronizes data from the
ALIAS/BUCKET
to the remoteBUCKET
. -
Repeat creating the rule in the reverse direction.
Use the
mc replicate add
command to add a new replication rule to the second AIStor deployment.mc replicate add ALIAS/BUCKET \ --remote-bucket 'https://USER:PASSWORD@HOSTNAME:PORT/BUCKET' \ --replicate "delete,delete-marker,existing-objects"
- Specify the ALIAS and Bucket of the second AIStor deployment.
- Modify the
--remote-bucket
parameters to specify the remote AIStor deployment and bucket.
Once saved the replication rule synchronizes data from the
ALIAS/BUCKET
to the remoteBUCKET
. -
Validate the configuration.
Use
mc cp
to copy a new object to the replicated bucket on one of the deployments.mc cp ~/foo.txt ALIAS/BUCKET
Use
mc ls
to verify the object exists on the destination bucket:mc ls ALIAS/BUCKET