Same-region replication (SRR) enables the automatic and asynchronous (near real-time) replication of objects across buckets within the same region. Operations such as the creation, overwriting, and deletion of objects can be synchronized from a source bucket to a destination bucket.
Scenarios
If your data cannot be transferred out of your country or region based on the compliance requirements of local laws and regulations, you can configure SRR rules to store the replicas of data in the source bucket in multiple destination buckets within the same region. Objects in a destination bucket are exact replicas of those in a source bucket. They have the same object names, versioning information, object content, and object metadata such as the creation time, owner, user metadata, and access control lists (ACLs).
Features
SRR supports the following features:
- Data synchronization between buckets in the same region
You can configure SRR rules to synchronize data from a source bucket to multiple destination buckets in the same region. By default, you can configure up to 100 SRR rules for a bucket. The bucket can be specified as a source bucket or a destination bucket.
If you want to configure more than 100 SRR rules for a bucket, contact technical support.
- Real-time data synchronization
You can configure SRR rules to monitor data that is added, removed, or modified in real time and synchronize these changes to a destination bucket. Operations performed on objects that are smaller than 2 MB are synchronized within minutes to ensure data consistency between the source and destination buckets.
- Historical data migration
Historical data can be synchronized from a source bucket to a destination bucket. This way, two identical data replicas are individually stored in the source and destination buckets.
- Real-time display of the synchronization progress
You can view the last synchronization time for real-time data synchronization and the percentage of synchronization for historical data migration.
- Versioning
SRR ensures eventual consistency between the data in source and destination buckets for which versioning is enabled. If you configure an SRR rule to synchronize only added and modified data, delete operations performed on the specified version of an object in the source bucket are not synchronized to the destination bucket. However, delete markers created in the source bucket are synchronized to the destination bucket.
Usage notes
- Billing
After SRR is enabled, you are not charged for the traffic that is generated when you use SRR to replicate objects in Object Storage Service (OSS). Each time an object is synchronized, OSS accumulates the number of requests. However, you are not charged for the requests.
- Replication time
In SRR, data is replicated asynchronously. Depending on the size of the data, it can take anywhere from a few minutes to several hours to replicate data to the destination bucket.
Limits
- You can configure CRR between two unversioned buckets or two versioned buckets.
- The versioning status of two buckets between which a CRR rule is configured cannot be changed.
- 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.
Use the OSS console
Use the RESTful API
If your business requires a high level of customization, you can directly call RESTful APIs. To directly call an API, you must include the signature calculation in your code. For more information, see PutBucketReplication.