Cross-region Replication Overview
Last updated: 2019-09-24 17:27:06PDF
With a cross-region replication rule, COS can automatically and asynchronously replicate the new objects added to one bucket to another bucket in a different region. When cross-region replication is enabled, COS will accurately replicate the object content (such as object metadata and version ID) in the source bucket to the destination bucket, and the object copies contain exactly the same attribute information. Additionally, operations on the objects in the source bucket, such as adding or deleting, will also be synced to the destination bucket.
- To enable cross-region replication, you need to make sure that the source and destination buckets are in different regions and both have versioning enabled.
- After cross-region replication is enabled, the object copies will be of the same storage class as the source objects, unless you specify a different storage class for the object copies during replication.
- During replication, COS will copy the access control list (ACL) of the source bucket. Currently, the source bucket and destination bucket must be in the same account.
- Remote disaster recovery: COS boasts 11 nines of availability for object data, but there is still a slight chance of data loss due to force majeure such as wars and natural disasters. If you want to avoid data loss by explicitly having a separate copy in a different region, you can use cross-region replication to achieve remote disaster recovery. In this way, when the IDC in one region is damaged due to force majeure, the IDC in the other region can still provide data copies for your use.
- Compliance: COS ensures data availability by providing multiple copies and erasure codes for data in physical disks by default. However, there may be compliance requirements in some industries stipulating that you keep copies in another region. Cross-region replication allows data to be replicated across regions to meet such requirements.
- Access latency reduction: when you have end users accessing objects from different regions, with cross-region replication, you can maintain object copies in the available storage regions closest to them, which can minimize access latency to deliver a better user experience.
- Special technical requirements: if you have computing clusters in two different regions and the clusters need to process the same set of data, with cross-region replication, you can maintain object copies in both regions.
- Data migration and backup: You can copy your business data from one availability region to another one as needed to implement data migration and backup.
The time it takes for COS to replicate objects depends on factors such as object size, distance between storage regions, and how the objects were uploaded. The time needed for synchronization may range from a few minutes to a few hours, subject to such factors.
- Object size: it takes more time to replicate large objects, for which multipart upload is recommended for faster upload and synchronization.
- Distance between the source and destination regions: the farther the regions are away from each other, the longer it takes to transfer data.
- How the objects were uploaded: unlike simple upload where data can only be uploaded or downloaded serially, multipart upload supports concurrent uploads which can speed up upload and cross-region replication of large files. For more information, see Simple Upload and Multipart Upload.
To use cross-region replication, you need to enable versioning, which will keep multiple historical versions of objects in the buckets and result in more storage consumption. COS cross-region replication will incur fees for data requests, downstream traffic, and data storage. Among them, data storage is charged at the prices in the destination bucket region. If you want to reduce the costs or customize your data retention approach, you can do so through lifecycle management based on your business needs.
- If you want the object copies in the destination bucket to follow the same lifecycle rule as those in the source bucket, create the same lifecycle rule in the destination bucket.
- If you have set a lifecycle rule for the destination bucket, note that the creation time of the object copies generated by cross-region replication is the creation time of the source objects but not the time when the copies are replicated to the destination bucket.
- If you have set a lifecycle rule in the source bucket and an object being replicated needs to be deleted according to the lifecycle rule, the object will still be replicated, and the object copy will be retained in the destination bucket.
To use cross-region replication, you need to enable versioning for both the source and destination buckets. For more information, see Versioning Overview. Once versioning is enabled, you should note that disabling it will affect cross-region replication:
- If you try to disable versioning in a bucket where cross-region replication is enabled, COS will return an error prompting you to delete the cross-region replication rule before disabling versioning.
- If you try to disable versioning in a destination bucket, COS will prompt you that cross-region replication will be affected if you do so. If you proceed to disable versioning, the cross-region replication rule that uses this bucket as the destination bucket will become invalid.