Cross-region replication enables the automatic and asynchronous (near real-time) replication of objects across buckets in different OSS data centers (regions). It synchronizes operations such as the creation, overwriting, and deletion of objects from the source bucket to the destination bucket.
- After cross-region replication is enabled, cross-region traffic is generated when you replicate objects between buckets in the source and destination regions. You are charged for the traffic that occurs during cross-region replication. Each time an object is synchronized, OSS counts the number of requests and calculates the charges on a pay-as-you-go basis. For more information, see Billing items and methods.
- The cross-region replication feature is available between regions in mainland China, between regions outside mainland China, and between China (Hong Kong) and regions outside mainland China.
- You can use a specified CMK to encrypt the objects replicated to the destination bucket when you perform replication between regions outside mainland China, except for Singapore, and between China (Hong Kong) and regions outside mainland China.
Cross-region replication can be configured for a wide range of scenarios:
- Compliance requirements: Although OSS stores multiple replicas of each object on physical disks, the replicas must be stored at a certain distance from each other to comply with regulations. Cross-region replication allows you to replicate data between geographically distant OSS data centers to satisfy these compliance requirements.
- Minimum latency: You have users who are located in two geographical locations. To minimize latency when accessing objects, you can maintain replicas of objects in OSS data centers that are geographically closer to users.
- Data backup and disaster recovery: You have high requirements for data security and availability, and want to explicitly maintain replicas of all written data in a second data center. If one OSS data center is damaged in a catastrophic event such as earthquake or tsunami, you can use backup data from the other data center.
- Data replication: For business reasons, you may need to migrate data from one OSS data center to another.
- Operational reasons: You have compute clusters that analyze the same set of objects in two different data centers. You can choose to maintain object replicas in two regions.
|Console||A user-friendly and intuitive web application|
|Java SDK||SDK demos for various programming languages|
Cross-region replication supports the synchronization between buckets that have different names. If two buckets are in different regions, you can use this feature to synchronize data from the source bucket to the destination bucket in real time. This feature provides the following capabilities:
- Real-time data synchronization: This feature monitors data addition, deletion, and modification in real time and synchronizes these changes to the destination bucket. For objects no larger than 2 MB in size, data is synchronized within a few minutes to ensure data consistency between the source and the destination.
- Historical data migration: This feature synchronizes historical data from the source bucket to the destination bucket, providing two identical data replicas.
- Real-time display of synchronization progress: This feature displays the last synchronization time for real-time data synchronization and the percentage of synchronization for historical data migration.
- Mutual synchronization: You can configure data synchronization between Bucket A and Bucket B to enable mutual data synchronization.
- Versioning: If versioning is enabled, make sure that the object version information is consistent between the source and destination buckets. If the synchronization mode is specified as write synchronization of add and change operations, when an object version in the source bucket is deleted, the change is not synchronized to the destination bucket. However, the delete marker of the source bucket is synchronized to the destination bucket.
- KMS-based encryption: If KMS-based encryption is enabled, OSS uses data keys generated by using the specified CMK to encrypt the objects replicated to the destination bucket and adds the CMK ID to the metadata of the encrypted objects. An encrypted object is automatically decrypted when it is downloaded by authorized users.
- You can still perform operations on buckets that are being synchronized. However, an object that is replicated from the source bucket may overwrite an object that has the same name in the destination bucket.
- Cross-region replication is an asynchronous (near real-time) process. Based on the size of the data, it usually takes several minutes to several hours to copy data from the source bucket to the destination bucket.
- Cross-region synchronization applies only when no synchronization to or from a third bucket is enabled for the two buckets to be synchronized. For example, if you synchronize data from Bucket A to Bucket B, you are not allowed to synchronize data from Bucket A to Bucket C, unless you delete the configuration to synchronize data from Bucket A to Bucket B. Similarly, if you synchronize data from Bucket A to Bucket B, you are not allowed to synchronize data from Bucket C to Bucket B.
- Synchronization is supported only between two buckets in different regions. You cannot synchronize data between buckets in the same region.
- You can only synchronize data between two buckets that both have versioning enabled or have versioning disabled.
- You cannot change the versioning states of the source and destination buckets that are being synchronized.