Cross-region Replication Overview
Last updated: 2019-08-20 16:43:06PDF
Cross-region replication can automatically and asynchronously copy the new objects added to one bucket to another in a different region after a cross-region replication rule is configured. When cross-region replication is enabled, COS will accurately copy 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 copied to the destination bucket.
- To enable cross-region replication, the source and destination buckets should be 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 of the object copies during replication.
- During replication, COS will copy the access control list (ACL) of the source bucket. Currently, it does not support buckets under two different accounts as the source and destination buckets.
- Remote disaster recovery: COS boasts 11-nines availability for object data, but there is still a slight chance of data loss due to force majeure such as war and natural disasters. If you want to avoid data loss by having a separate copy in a different region, you can use cross-region replication to achieve remote disaster recovery, so that 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 separate copies in another region. Cross-region replication allows data to be replicated across regions to meet such requirements.
- Reduced access latency: When your end users access objects from different regions, you can maintain object copies in available storage regions closest to them through cross-region replication, which can minimize access latency and deliver a better user experience.
- Special technical requirements: If you have compute clusters in two different regions and the clusters need to process the same set of data, you can maintain object copies in both regions through cross-region replication.
- 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.
Replication Time Limitation
The time it takes for COS to replicate objects depends on factors such as object size, distance between storage regions, and how the objects are 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 to reduce the upload and synchronization time.
- Distance between storage regions: The farther the regions are away from each other, the longer data transfer takes for synchronization.
- Object upload method. As opposed to simple upload where data can only be uploaded or downloaded serially, multipart upload supports concurrent uploads and therefore can speed up upload and cross-region replication of large files. For more information, see Simple Upload and Multipart Upload.
Cross-region replication requires versioning to be enabled, which generates multiple historical versions of objects in the buckets and results in more storage consumption. Fees for data requests, downstream traffic, and data storage are incurred during COS cross-region replication. Among them, data storage fees are charged at the prices in the destination bucket region. If you want to reduce cross-region replication and versioning fees or customize your data retention methods, 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 the source objects, create the same lifecycle rule in the destination bucket as that in the source bucket.
- If you 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 appears in the destination bucket.
- If you set a lifecycle rule in the source bucket and an object being replicated needs to be deleted by the lifecycle rule, cross-region replication of the object will still be completed, and the object copy will be retained in the destination bucket.
To use cross-region replication, versioning should be enabled in both the source and destination buckets. For more information, see Versioning Overview. Once versioning is enabled, you should note that suspending it will affect cross-region replication:
- If you try to suspend versioning in the bucket where cross-region replication is enabled, COS will return an error prompting you to delete the cross-region replication rule before suspending versioning.
- If you try to suspend versioning in the destination bucket, COS will prompt you that cross-region replication will be affected after versioning is suspended. If you proceed to suspend versioning, the cross-region replication rule that uses this bucket as the destination bucket will become invalid.