Enable Multi-Site Server-Side Bucket Replication
The procedure on this page configures automatic server-side bucket replication between multiple Buckit deployments. Multi-Site Active-Active replication builds on the Enable Two-Way Server-Side Bucket Replication procedure with additional considerations required to ensure predictable replication behavior across all sites.
To configure replication between arbitrary S3-compatible services, use
bm mirror.To configure one-way “active-active” replication between two Buckit deployments, see Enable Two-Way Server-Side Bucket Replication.
To configure one-way “active-passive” replication between Buckit deployments, see Enable One-Way Server-Side Bucket Replication.
Multi-Site Active-Active replication configurations can span multiple racks, datacenters, or geographic locations. Complexity of configuring and maintaining multi-site configurations generally increases with the number of sites and size of each site.
See also
Use the
bm replicate updatecommand to modify an existing replication rule.Use the
bm replicate updatecommand with the--state "disable"flag to disable an existing replication rule.Use the
bm replicate rmcommand to remove an existing replication rule.
Requirements
You must meet all of the basic requirements for bucket replication described in Bucket Replication Requirements.
In addition, to create multi-site bucket replication set up, you must meet the following additional requirements:
Access to All Clusters
You must have network access and log in credentials with correct permissions to all deployments to set up multi-site active-active bucket replication.
You can access the deployments by installing bm and using the command line.
Use the bm alias set command to create an alias for each Buckit deployment.
Alias creation requires specifying an access key for a user on the deployment. This user must have permission to create and manage users and policies on the deployment.
Specifically, ensure the user has at minimum:
Considerations
Click to expand any of the following:
Use Consistent Replication Settings
Buckit supports customizing the replication configuration to enable or disable the following replication behaviors:
Replication of delete operations
Replication of delete markers
Replication of existing objects
Replication of metadata-only changes
When configuring replication rules for a bucket, ensure that all Buckit deployments participating in multi-site replication use the same replication behaviors to ensure consistent and predictable synchronization of objects.
Replication of Existing Objects
Buckit supports automatically replicating existing objects in a bucket.
Buckit requires explicitly enabling replication of existing objects using the bm replicate add --replicate or bm replicate update --replicate and including the existing-objects replication feature flag.
This procedure includes the required flags for enabling replication of existing objects.
Replication of Delete Operations
Buckit supports replicating delete operations onto the target bucket. Specifically, Buckit can replicate versioning Delete Markers and the deletion of specific versioned objects:
For delete operations on an object, Buckit replication also creates the delete marker on the target bucket.
For delete operations on versions of an object, Buckit replication also deletes those versions on the target bucket.
Buckit requires explicitly enabling replication of delete operations using the bm replicate add --replicate or bm replicate update --replicate.
This procedure includes the required flags for enabling replication of delete operations and delete markers.
Buckit does not replicate delete operations resulting from the application of lifecycle management expiration rules. Configure matching expiration rules for the bucket on all replication sites to ensure consistent application of object expiration.
Procedure
This procedure requires repeating steps for each Buckit deployment participating in the multi-site replication configuration. Depending on the number of deployments, this procedure may require significant time and care in implementation. Buckit recommends reading through the procedure before attempting to implement the documented steps.
Configure Multi-Site Bucket Replication Using the Command Line
Configure Multi-Site Bucket Replication Using the Command Line bm
This procedure uses the placeholder ALIAS to reference the alias each Buckit deployment being configured for replication.
Replace these values with the appropriate alias for each Buckit deployment.
This procedure assumes each alias corresponds to a user with the necessary replication permissions.
1) Create New Bucket Replication Rules
Use the bm replicate add command to add a new replication rule to each Buckit deployment.
bm replicate add ALIAS/BUCKET \
--remote-bucket 'https://USER:PASSWORD@HOSTNAME:PORT/BUCKET' \
--replicate "delete,delete-marker,existing-objects"
Replace
ALIASwith the alias of the origin Buckit deployment. The name must match the bucket specified when creating the remote target in the previous step.Replace
BUCKETwith the name of the bucket to replicate from on the origin deployment.Replace the
--remote-bucketto specify the remote Buckit deployment and bucket to which theALIAS/BUCKETreplicates.The
USER:PASSWORDmust correspond to a user on the remote deployment with the necessary replication permissions.The
HOSTNAME:PORTmust resolve to a reachable Buckit instance on the remote deployment. TheBUCKETmust exist and otherwise meet all other replication requirements.The
--replicate "delete,delete-marker,existing-objects"flag enables the following replication features:See
bm replicate add --replicatefor more complete documentation. Omit any field to disable replication of that component.
Specify any other supported optional arguments for bm replicate add.
Repeat these commands for each remote Buckit deployment participating in the multi-site replication configuration.
For example, a multi-site replication configuration consisting of Buckit deployments buckit1, buckit2, and buckit3 would require repeating this step on each deployment for each remote.
Specifically, in this scenario, perform this step twice on each deployment:
On the
buckit1deployment, once for a rule forbuckit2and again for a separate rule forbuckit3.On the
buckit2deployment, once for a rule forbuckit1and again for a separate rule forbuckit3.On the
buckit3deployment, once for a rule forbuckit1and again for a separate rule forbuckit2.
2) Validate the Replication Configuration
Use bm cp to copy a new object to the replicated bucket on one of the deployments.
bm cp ~/foo.txt ALIAS/BUCKET
Use bm ls to verify the object exists on the destination bucket:
bm ls ALIAS/BUCKET
Repeat this test on each deployment by copying a new unique file and checking that the file replicates to each of the other deployments.
You can also use bm stat to check the file to check the current replication stage of the object.