Cross-region replication (CRR) enables the automatic and asynchronous (near real-time) replication of objects across buckets in different Object Storage Service (OSS) regions. CRR synchronizes operations such as the creation, overwriting, and deletion of objects from a source bucket to a destination bucket.
Scenarios
CRR can meet your requirements for cross-region disaster recovery and data replication. Objects in destination buckets are exact replicas of objects in the source bucket. The objects have the same object names, versioning information, object content, and object metadata, such as the creation time, owner, user metadata, and access control list (ACL). You can configure CRR rules to meet your business requirements:
Compliance requirements
OSS stores multiple replicas of objects in physical disks. However, to meet compliance requirements, the replicas must be stored in multiple data centers that are located at a geographical distance from each other. CRR allows you to replicate data between geographically distant data centers to meet compliance requirements.
Minimal latency
You have customers who are located in two geographical locations. To minimize the latency that occurs when the customers access objects, you can maintain the replicas of objects in data centers that are geographically closer to the customers.
Data backup and disaster recovery
You have strict requirements for data security and availability. You want to replicate all data in a data center to another data center. If one data center is damaged because of a catastrophic event, such as an earthquake or a tsunami, you can use the data that is backed up in the other data center.
Data migration
For business reasons, you may need to migrate data from one data center to another data center.
Operational reasons
You have compute clusters that are deployed in two data centers to analyze the same group of objects. You can maintain the replicas of the objects in the two regions.
Features
CRR provides the following features:
RTC
After Replication Time Control (RTC) is enabled, OSS replicates most of the objects that you uploaded to OSS within a few seconds and replicates 99.99% of objects within 10 minutes. In addition, RTC provides real-time monitoring of data replication. This allows you to easily monitor replication tasks by using different metrics.
Near real-time data replication
You can configure CRR rules to monitor data that is added, removed, or modified in near real time and synchronize these changes to a destination bucket. This ensures data consistency between the source and destination buckets.
Historical data migration
Historical data can be replicated from a source bucket to a destination bucket. This way, two data replicas are individually stored in the source and destination buckets.
Replication progress query
You can view the most recent replication time of the replicated data and the progress of the replication for historical data migration in percentage.
Versioning
CRR ensures eventual consistency between the data in the source and destination buckets for which versioning is enabled. If you configure a CRR rule to replicate only the added and modified data, deletion operations performed on the specified version of an object in the source bucket are not replicated to the destination bucket. However, the delete markers created in the source bucket are replicated to the destination bucket.
Transfer acceleration
You can use transfer acceleration to accelerate data transfer when CRR tasks are performed across regions inside and outside the Chinese mainland. For more information, see Enable transfer acceleration.
Replication of encrypted data
CRR allows you to replicate objects that are not encrypted and objects that are encrypted by using SSE-KMS or SSE-OSS. For more information, see CRR in specific scenarios.
Event notification and real-time log query
You can use the following methods to receive notifications of changes that are made to objects in source and destination buckets during CRR. The changes include adding, modifying, removing, and overwriting objects.
Set the event type to the following values in the event notification rule:
ObjectReplication:ObjectCreated
,ObjectReplication:ObjectRemoved
, andObjectReplication:ObjectModified
. For more information, see Overview.Enable real-time log query in the OSS console to obtain the statistics of operations that are performed on objects. For more information, see Query real-time logs.
Usage notes
Billing
You are charged for the traffic that is generated when you use CRR to replicate objects in OSS. For more information, see Traffic fees.
Each time an object is replicated, OSS calculates the number of requests. You are charged for the requests. For more information, see API operation calling fees.
If you enable transfer acceleration, you are charged transfer acceleration fees. For more information, see Transfer acceleration fees.
If you enable RTC, you are charged additional RTC fees. For more information, see RTC traffic fees.
If you use CRR to replicate Archive objects from a source bucket to a destination bucket, no data retrieval operations are involved in the process, and you are not charged data retrieval fees.
Replication time
In CRR, data is asynchronously replicated in near real time. The period of time that is required to replicate data from the source bucket to the destination bucket may range from a few minutes to a few hours. The replication time varies based on the data size.
Limits
Regions
CRR is supported in the following regions: China (Hangzhou), China (Shanghai), China (Nanjing - Local Region), China (Fuzhou - Local Region), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), US (Silicon Valley), US (Virginia), Japan (Tokyo), South Korea (Seoul), Singapore, Australia (Sydney), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), India (Mumbai), Germany (Frankfurt), UK (London), and UAE (Dubai).
You must enable transfer acceleration when you perform CRR between the regions inside and outside the Chinese mainland.
CRR rules based on object tags can be configured only in the following scenarios:
The source region is China (Hangzhou), and the destination region is a region other than China (Hangzhou).
The source region is Australia (Sydney), and the destination region is a region outside the Chinese mainland, except for Australia (Sydney).
Number of CRR rules
Data in a source bucket can be replicated to multiple destination buckets. By default, you can configure up to 100 CRR rules for a bucket. A bucket can be specified as a source bucket in a CRR rule and a destination bucket in another CRR rule at the same time.
If you want to configure more than 100 CRR rules for a bucket, contact technical support.
Operations
You can configure CRR between two unversioned buckets or between two versioning-enabled buckets.
You cannot change the versioning status of two buckets for which a CRR rule is configured.
If you configure a CRR rule for two buckets, an object replicated from the source bucket may overwrite an object that has the same name in the destination bucket.
Data in a source bucket can be replicated to multiple destination buckets. By default, you can configure up to 100 CRR rules for a bucket. A bucket can be specified as a source bucket in a CRR rule and a destination bucket in another CRR rule at the same time. If you want to configure more than 100 CRR rules for a bucket, contact technical support.
Cold Archive objects in a source bucket cannot be replicated to a destination bucket.
You cannot replicate Appendable objects in a source bucket to a destination bucket whose storage class is Cold Archive.
Use the OSS console
Use OSS SDKs
Use ossutil
Use RESTful APIs
FAQ
Does SSR synchronize lifecycle rule-based deletions from the source bucket to the destination bucket?
It depends on whether the replication policy of the SSR rule is Add/Change or Add/Delete/Change.
Add/Change: When objects are deleted from the source bucket based on a lifecycle rule, OSS does not delete their copies from the destination bucket.
Add/Delete/Change: When objects are deleted from the source bucket based on a lifecycle rule, OSS deletes their copies from the destination bucket.
NoteIn the destination bucket, you may find objects with the same names as those that are deleted from the source bucket based on a lifecycle rule. This does not indicate that the Add/Delete/Change replication policy fails to take effect. The same-name objects in the destination bucket are not real copies of objects that are deleted from the source bucket. They may be separately written to the destination bucket and given the same names as the objects that have been deleted from the source bucket based on a lifecycle rule.
Do versioning-suspended buckets support CRR?
No, CRR is not supported by versioning-suspended buckets. You can configure CRR between two unversioned buckets or between two versioning-enabled buckets.
Does OSS support chained replication?
No, OSS does not support chained replication. For example, if a data replication rule is configured to replicate data from Bucket A to Bucket B and another data replication rule is configured to replicate data from Bucket B to Bucket C, data in bucket A is only replicated to Bucket B and is not replicated to Bucket C.
If you want to replicate data from Bucket A to Bucket C, you must configure a data replication rule to replicate data from Bucket A to Bucket C.
Why is the replication progress of historical data displayed as 0% for a long period of time?
The replication progress of historical data is not updated in real time. You must wait until all objects are scanned. If a large number of objects are stored in your bucket, such as hundreds of millions of objects, several hours is required before the replication progress of historical data is updated. If the replication progress of historical data is not updated, it does not mean that historical data is not replicated to the destination bucket.
You can check whether historical data in the source bucket is replicated to the destination bucket by viewing the storage capacity of the destination bucket and traffic usage, such as inbound and outbound traffic. For more information about how to view the storage capacity of the destination bucket and CRR traffic, see View the resource usage of a bucket.
If the destination bucket uses KMS to encrypt data, am I charged for the encryption algorithm operations?
If the destination bucket uses KMS to encrypt data, you are charged for encryption algorithm operations. For more information about the fees, see Billing of KMS.
Can I disable CRR?
Yes, you can click Disable Replication in the Actions column on the Cross-Region Replication page to disable CRR.
After you disable CRR, the replicated data is stored in the destination bucket. The incremental data in the source bucket is not replicated to the destination bucket.