Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2024-03-15 14:07:26
When you send a request to KS3 to access an object that does not exist in KS3, KS3 sends a request to the origin address to retrieve the object if back-to-origin rules are configured, and returns the object to you. For a large object such as an image or a video, KS3 requests part of its data from the origin address and returns it to you, reducing your waiting time. Meanwhile, the object is saved to KS3.
Note:
You can use the mirroring-based back-to-origin service to obtain an object of up to 50 GB in size.
You can configure up to 20 back-to-origin rules.
The data pulled to KS3 is stored in Standard storage by default.
You cannot use the object name setting feature of KS3 to change the names of objects pulled to KS3.
You must contact Kingsoft Cloud business staff or submit a ticket to apply for using the mirroring-based back-to-origin service before you start configuration in the console.
Log in to the KS3 console and click Bucket in the left navigation pane. On the page that appears, click the name of the target bucket.
Click Bucket Settings. Then, click the Mirror tab. The Mirroring Back-to-Origin tab appears by default.
Click Add Rule. In the Add Rule panel, configure the parameters described in the following table.
Parameter | Required | Description |
---|---|---|
Prerequisite | Yes | 1. HTTP Status Code 404: the default item, which is required. |
Origin URL | Yes | The source URL for back-to-origin. |
Access Control | No | Specifies whether to set the objects automatically and smoothly migrated from the origin server to KS3 to public or private. The objects are private by default. |
Other Parameter | No | Specifies whether to transmit the query string in the request that is sent to KS3 to the origin server. The query string is not passed through to the origin server by default. |
3xx Response | No | Specifies whether to follow the origin server to redirect requests based on the 3XX status code to obtain resources and save the resources to KS3. The default value is Yes. If you set this parameter to No, KS3 passes through the 3XX response to the client without following the 3XX address. |
Set Transmission Rule of HTTP Header | No | Specifies whether to transmit HTTP headers to the origin server. No HTTP header is transmitted to the origin server by default. You can configure transmission rules for HTTP headers to customize transmission actions such as passthrough, filtering, or modification. |
Example of setting an HTTP header transmission rule: Allow: Select Transmit Specified HTTP Header and enter response-content-type. Deny: Select Prohibit Transmission of Specified HTTP Header and enter If-Modified-Since. Set up: Set the specified HTTP header c-header to 111.
Based on the preceding configurations, assume that the request you send to KS3 contains the following HTTP headers:
GET /object
host : bucketname. ks3-cn-beijing.ksyuncs.com
response-content-type :String
If-Modified-Since : Fri, 26 Dec 2014 06:48:46 GMT
c-header : ccc
After mirroring-based back-to-origin is triggered, the request that KS3 sends to the origin server contains the following headers:
GET /object
host : source.com
response-content-type :String
c-header : 111
Note:
You cannot configure transmission rules for the following HTTP headers:
Headers starting with the following prefixes:
x-kss-
x-ks3-
All standard HTTP headers, for example:
content-length
authorization2
authorization
range
date
The rule priority is as follows: Set up > Deny > Allow. For example, assume that the following three rules are configured for the x-age header: allow x-age to be transmitted to the origin server, prohibit x-age from being transmitted to the origin server, and set x-age to 1. In this case, the x-age header with a value of 1 is transmitted to the origin server.
Click OK.
Log in to the KS3 console and click Bucket in the left navigation pane. On the Bucket list page, click the name of the target bucket.
Click Bucket Settings. Then, click the Mirror tab. The Mirroring Back-to-Origin tab appears by default.
Find the back-to-origin rule that you want to edit and click Edit in the Action column.
In the panel that appears, edit the rule.
Log in to the KS3 console and click Bucket in the left navigation pane. On the Bucket list page, click the name of the target bucket.
Click Bucket Settings. Then, click the Mirror tab. The Mirroring Back-to-Origin tab appears by default.
Find the back-to-origin rule that you want to delete and click Delete in the Action column.
In the message that appears, click OK.
You can move up or down the back-to-origin rules to adjust their sequence. KS3 determines the matching priority of the rules based on their sequence. If Rule 1 is matched, Rule 2 will not be matched. However, if the origin server in Rule 1 is unavailable, KS3 will send a request to the standby origin server in Rule 2. You can configure up to 20 rules. Therefore, a maximum of 19 standby origin servers are available.
Log in to the KS3 console and click Bucket in the left navigation pane. On the Bucket list page, click the name of the target bucket.
Click Bucket Settings. Then, click the Mirror tab. The Mirroring Back-to-Origin tab appears by default.
Find the target back-to-origin rule and click Move Up or Move Down in the Action column.
Example of matching multiple rules:
Assume that multiple rules with the same or partially overlapping back-to-origin conditions are configured:
Rule 1: Access test.com when the 404 error is returned for all objects.
Rule 2: Access 141.0.0.12 when the 404 error is returned for all objects.
Rule 3: Access back.com when the 404 error is returned for objects with the name prefix 333.
Processing of KS3:
KS3 matches the request against Rule 1. If data can be properly pulled from test.com, KS3 no longer matches the request against Rule 2.
KS3 matches the request against Rule 1. However, test.com is unavailable when the back-to-origin service of KS3 attempts to access it. Then, KS3 attempts to access 141.0.0.12 configured in Rule 2.
If 141.0.0.12 configured in Rule 2 is also unavailable and the object name prefix is 333, KS3 continues to access back.com in Rule 3. If the object name prefix is not 333, KS3 returns the 404 error to you.
Pure Mode