You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Multi-region access points (MRAP)
Creating back-to-origin rules for multi-region access points
Copy page
Download PDF
Creating back-to-origin rules for multi-region access points
You can set up back-to-origin rules for a multi-region access point ("multi-region back-to-origin rules"). With these rules, if you request an object from an underlying bucket via the access point and the object does not exist, TOS retrieves the object from the other underlying buckets and returns it to the client. This topic covers an introduction, supported policies, and guidelines for creating multi-region back-to-origin rules.​
Introduction​
In multi-bucket replication mode, TOS creates cross-region replication rules for the multi-region access point. These rules asynchronously replicate data across the underlying buckets. When accessing TOS through this access point, requests are automatically routed to the nearest bucket. However, if you access an object before its replication is complete and have not created any back-to-origin rule for this access point, you will receive a 404 error.​
Once back-to-origin rules have been configured for the multi-region access point, if an object is requested via GetObject or HeadObject and is not found in the specified bucket, TOS retrieves the object from other buckets associated with the same access point and returns it to the client synchronously. These rules allow you to easily access data from all underlying buckets through a single endpoint. This feature enables global access regardless of the bucket in which the data is stored.​
Supported policies​
See the table below for the policies supported by multi-region back-to-origin.​
​
Scenario​
Type​
Description​
Characteristics​
When back-to-origin rules are configured for a multi-region access point​
Shortest path first​
When you access an object via GetObject or HeadObject through a multi-region access point, and the object is not found in the specified bucket, TOS first attempts to fetch the object from the nearest available bucket. If the target object is not found there, TOS proceeds to the next closest bucket and continues until the object is located. Then, it returns the object to the client.​
  • High performance; low latency;​
  • Weak data consistency; does not guarantee retrieval of the latest data.​
​
Newest object first​
When you access an object via GetObject or HeadObject through a multi-region access point, TOS retrieves the latest version of the object from the underlying buckets, regardless of whether the object exists in the specified bucket, and returns it to the client.​
  • Lower performance; higher latency;​
  • Strong data consistency; guarantees retrieval of the latest data.​
When back-to-origin rules are not configured for a multi-region access point​
None​
When you access TOS via a multi-region access point, TOS automatically routes the request to the nearest bucket. If you access an object that has not yet been replicated, you will receive a 404 error.​
Weak data consistency; A 404 error may occur if you try to access an object that has not yet been replicated.​
​
How multi-region back-to-origin works​
How multi-region back-to-origin works depends on the policy type you select.​
tip​
Two data consistency models are provided when you access TOS through a multi-region access point:​
  • Strong write-after-read consistency: After an object is written to a bucket associated with a multi-region access point, accessing the object through that access point immediately returns the latest version of the object.​
  • Eventual consistency: After an object is written to a bucket linked to a multi-region access point, accessing the object through that access point may not return the latest data, depending on the bucket to which the request is routed. Once object replication is complete, however, the latest version of the object will be accessible through the access point.​
  • Newest object first​
  • This policy ensures strong read-after-write consistency. When you access TOS through a multi-region access point, TOS always retrieves and returns the latest version of an object from the underlying buckets to the client, regardless of the circumstances.​
  • Shortest path first​
  • This policy does not guarantee that the data you access is the latest version. The version of the object retrieved through a multi-region access point can vary depending on the scenario.​
  • For example, the multi-region access point mrap1 is created with three buckets: bucket-r1, bucket-r2, and bucket-r3. bucket-r1 is located in China (Beijing), bucket-r2 in China (Shanghai), and bucket-r3 in China (Guangzhou).​
  • ​
    Scenario​
    Data consistency​
    Example​
    When you upload an object to a single bucket​
    Strong write-after-read consistency​
    object-v1 is uploaded to bucket-r1. TOS routes a request through the multi-region access point to bucket-r2, which triggers a multi-region back-to-origin action.​
    During the back-to-origin process, TOS accesses the underlying buckets in order of proximity. TOS finds object-v1 in bucket-r1, fetches the latest version object-v1, and returns it to the client.​
    When you upload objects to multiple buckets​
    Eventual consistency​
    Two objects with the same name (object-v1 and object-v2) are uploaded. First, object-v1 is uploaded to bucket-r1, and then object-v2 is uploaded to bucket-r2. TOS routes a request through the multi-region access point to bucket-r3, which triggers a multi-region back-to-origin action.​
    During the back-to-origin process, TOS accesses the underlying buckets in order of proximity. If the nearest bucket is bucket-r1, TOS retrieves object-v1 and returns it to the client. If the nearest bucket is bucket-r2, TOS fetches object-v2 and sends it back to the requester. Once cross-region replication is complete, accessing TOS via the multi-region access point retrieves the latest version, which is object-v2.​
    When you overwrite an object​
    Eventual consistency​
    Two objects with the same name (object-v1 and object-v2) are uploaded to the same bucket. First, object-v1 is uploaded to bucket-r1, and then object-v2 is uploaded to bucket-r1.​
    The object retrieved when accessing via the multi-region access point depends on the time of access.​
    • Before cross-region replication is complete, accessing the object triggers a multi-region back-to-origin action. This action can retrieve the latest version, which is object-v2.​
    • After object-v1 is replicated to other buckets, accessing the object retrieves object-v1.​
    • After object-v2 is replicated to other buckets, accessing the object retrieves object-v2.​
    ​
Restrictions​
  • You can only create back-to-origin rules for existing multi-region access points.​
  • You can only create back-to-origin rules for multi-region access points in multi-bucket replication mode.​
  • It will take one to two minutes for the changes to take effect after you update or delete a multi-region back-to-origin rule.​
Steps​
  1. Log in to the TOS console.​
  1. In the left navigation pane, select Access point > Multi-Region Access Points.​
  1. On the Multi-Region Access Points page, click the multi-region access point you want to manage.​
  1. On the multi-region access point details page, click the Back-to-Origin rule tab. Then, click Create rule.​
  1. In the Create rule dialog, set the following parameters.​
  • ​
    Parameter​
    Description​
    Rule name​
    Enter a name for the multi-region back-to-origin rule.​
    Status​
    Select whether to enable the multi-region back-to-origin rule. The options are Enable and Disable.​
    Policy Type​
    Set the back-to-origin policy type. The options are:​
    • Shortest path first: TOS first attempts to fetch the object from the nearest available bucket. If the target object is not found there, TOS proceeds to the next closest bucket and continues until the object is located. Then, it returns the object to the client.​
    • Newest object first: TOS retrieves the latest version of the object from the underlying buckets, regardless of whether the object exists in the specified bucket, and returns it to the client.​
    Scope of application​
    Specify the scope of the resources that will trigger a multi-region back-to-origin action. The options are:​
    • Entire bucket: The rule applies to the entire bucket.​
    • Specify prefix: The rule applies to objects with the specified prefix. Accessing only those objects will trigger multi-region back-to-origin actions.​
    tip​
    Up to ten prefixes can be added.​
    ​
  1. Once you have finished configuring, click OK.​
Related operations​
​
Edit a multi-region back-to-origin rule
Delete a multi-region back-to-origin rule
​
On the multi-region access point details page, navigate to the Back-to-Origin rule tab. Click Edit in the Actions column of the rule you want to modify. Then, confirm the changes by clicking OK in the box that appears.​
​
​
Last updated: 2026.01.21 16:38:31