当前位置:网站首页>Operation and maintenance guide | cos back source setting practice
Operation and maintenance guide | cos back source setting practice
2022-06-24 17:24:00 【zrongzhou】
One 、 Back to source setting function introduction
1. brief introduction
Can pass Object storage Console , Set the back to source rule for buckets , When the requested object does not exist in the bucket or a specific request needs to be redirected , You can use the back to source rule from COS Access to the corresponding data . Setting back to source is mainly used for data thermal migration 、 Redirection of specific requests, etc , You can set it according to your actual needs .
explain :
- The success rate of pulling data back to the source depends on the network environment , Please give priority to telecommunication 、 Move 、 Unicom, etc IP paragraph .
- The bucket in the financial cloud region does not support the back to source setting .
Two 、 Schematic diagram of offline back to source and synchronous back to source architecture
1. Offline back to source diagram
2. Synchronization back to source diagram
3、 ... and 、 Console Configuration Guide
1. Operation steps
1) Sign in Object bucket console , Select the left menu bar 【 Bucket list 】, Go to the bucket list page . Click the bucket you want to set back to the source , Go to the bucket details page .
2) Click on the left 【 Basic configuration 】>【 Back to source settings 】 Configuration item , And then click 【 Add back to source rule 】.
3) Follow the configuration item instructions below to configure , Finally, click 【 preservation 】 that will do .
Back to source conditions : You can select the conditions to trigger back to the source according to your needs , To trigger back to source, all configured back to source conditions must be met at the same time .
- HTTP Status code : Currently, only the condition is HTTP Status code 404 Trigger back to source , This item is required and cannot be cancelled .
- File name prefix : When the requested file name prefix matches , Can trigger back to source rule . for example : Set the file name prefix to prefix, Then visit https://examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/prefix123.jpg And back to HTTP Status code for 404 when , Will trigger the back to source rule .
Back to source protocol :COS Used to access the specified origin HTTP agreement , The option is mandatory HTTPS、 mandatory HTTP And follow the request protocol .
- Optional coercion HTTPS/HTTP, be COS Will HTTPS/HTTP Protocol access source .
- Choose follow request protocol ,COS I will ask for COS The protocol used to access the origin .
Back to source address : Just fill in the domain name or IP Address , Support domain name or IP Add the port number after the address . No need to prefix http:// or https://. The correct example address is as follows :
Back to source address supports specific address settings , It can be configured as the following configuration items .
- Fixed files : When the back to source rule is triggered , Jump to fixed files by default .
- Specify prefix : When the back to source rule is triggered , Jump to the file with the specified prefix . For example, specify the prefix as test, visit https://examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/prefix123.jpg Trigger back to source rule when , It will jump to < Back to source address >/test/prefix123.jpg;
- Specify suffix : When the back to source rule is triggered , Jump to the file with the specified suffix . For example, specify the suffix as .jpg, visit https://examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/prefix123 Trigger back to source rule when , It will jump to < Back to source address >/prefix123.jpg;
Be careful :
- When selecting a fixed file , The other two types are not optional by default .
- The configuration of the specified prefix and the specified suffix can take effect at the same time .
Synchronize back to source : After turning on sync back to source , When COS When you need to go to the source station to pull data, it will not return 3XX Status code . Currently, this configuration item only supports Beijing 、 Shanghai 、 Singapore 、 The bucket in Mumbai .
3xx Follow the strategy : After opening , When the source station returns 3XX When redirecting the status code ,COS The default processing strategy of is follow 3XX Go to another source station to pull data again , If you select close, resources will not be pulled .
Back to source parameters : Specifies whether to access COS The request parameters carried by the server are transmitted to the source station .
Back to the source head :COS When visiting the origin , You can carry the specified new header to access . At present, it supports at most adding 10 A custom header .
4) When the rules are added , The system will assign the highest priority to your new rules ;COS Will return to the source according to the highest priority rule ; In addition, it can also be found on the rule list page , Click the Modify button to adjust the priority .
Four 、 Practice operation of offline and synchronous back to source
1. Offline back to source case
1) First, in the COS Console add back to source rule , The configuration is as follows ; among , Return to the source address and fill in the Internet address of the source station 111.230.xxx.xxx , Sync back to source selection “ close ” , Other settings can be configured according to the actual situation .
2) Add a COS Test files that don't exist on test-1.txt, And ensure that through the source station can be normal access ; At the same time, you can see that there is no test-1.txt file .
3) The origin uses nginx , Through here tail -f Under the way of monitoring nginx Access log , It is convenient to verify the request process of offline return to the source later .
4) Now through cos Domain name for access testing , As you can see from the test results , The client received it first cos Back to 302 after , I went to the source station again test-1.txt file , also cos A source station is also initiated after the delay test-1.txt File request , And finally pull and save the file to cos On .
2. Sync back to source cases
1) First, in the COS Console add back to source rule , The configuration is as follows ; among , Return to the source address and fill in the Internet address of the source station 111.230.xxx.xxx, Sync back to source selection “ Turn on ” , Other settings can be configured according to the actual situation .
2) Add a COS Test files that don't exist on test-2.txt, And ensure that through the source station can be normal access ; At the same time, you can see that there is no test-2.txt file .
3) The origin uses nginx , Through here tail -f Under the way of monitoring nginx Access log , It is convenient to verify the request process of synchronization back to the source later .
4) Now through cos Domain name for access testing , As you can see from the test results , The client receives it directly cos Back to 200 Respond to , instead of 302 Respond to ; meanwhile cos Also launched a source station test-2.txt File request , And finally pull and save the file to cos On .
边栏推荐
- [go language development] start to develop Meitu station from 0 - Lesson 5 [receive pictures and upload]
- One article combs multi task learning (mmoe/ple/dupn/essm, etc.)
- Tencent monthly security report helps rural revitalization, releases cloud security reports, and jointly builds a joint network security laboratory
- H265 video streaming web page without plug-in player easywasmlayer Troubleshooting and solution of JS unable to set cover photo
- CentOS 7 installing SQL server2017 (Linux)
- Snapshot management for elastic cloud enterprise
- Audio knowledge (I)
- 究竟有哪些劵商推荐?现在网上开户安全么?
- Tensor and tensor network background and significance - basic knowledge
- This time, talk about the dry goods of industrial Internet | TVP technology closed door meeting
猜你喜欢
随机推荐
Radiology: contralateral preoperative resting state MRI functional network integration is related to the surgical results of temporal lobe epilepsy
Building a cross public chain platform to solve DAPP development problems
Tencent cloud database mysql:sql flow restriction
Contributed code to famous projects for the first time, a little nervous
How to get the response body content in gin?
Introduction to koa (II) building the koa program
Release! Tencent IOA and Tencent sky screen were selected into the first batch of certified products of domestic digital trusted services
Explanation of pod DNS configuration & cases of DNS resolution failure
How to convert XML to HL7
[playing with Tencent cloud] a solution to the impassability of cross-border access to foreign websites using Tencent cloud CVM
Try catch finally implementation mechanism
Ramda's little-known side
Tencent monthly security report helps rural revitalization, releases cloud security reports, and jointly builds a joint network security laboratory
TRCT test cloud + article online speed
Markdown syntax -- Formula
Research on clock synchronization performance monitoring system based on 1588v2 Technology
Realize business development on behalf of small programs, and 99% restore the function of service category management in the background of official account
Why do you develop middleware when you are young? "You can choose your own way"
[play with Tencent cloud] check 9 popular Tencent cloud products
Solution to the problem that qlineedit setting qdoublevalidator setting range is invalid

