Synchronizing Data Stored on Multiple Clouds
Dual-write
If data is generated on an application or generated on a client but written to an object storage service through a server, the dual-write solution is recommended. The following figure shows the architecture.
Applications can interconnect with SDKs of two object storage services to write files to the two object storage systems in synchronous or asynchronous mode. The upstream traffic of object storage services is free of charge. Therefore, using this architecture does not increase any cost.
Back to Source
If an OBS bucket does not have a requested file, enable the back-to-source function to redirect the client request to the configured origin server. The data will be asynchronously obtained from the origin server and stored on Huawei Cloud Object Storage Service (OBS).
The procedure is as follows:
- A client requests a file from CDN.
- CDN pulls the requested file from OBS.
- CDN receives an HTTP status code 302 from OBS if the requested file does not exist.
- OBS asynchronously requests the file from the configured origin server (third-party object storage service).
- CDN follows the redirect to obtain data from the third-party object storage service.
- The third-party object storage service responds to the file request from CDN.
- CDN returns the requested file to the client. When the client requests the same file next time, CDN directly fetches the file from OBS.
The back-to-source function is triggered only when OBS initiates a request. Therefore, after a new file is uploaded to another object storage service, it is recommended that the application sends a GET request to OBS. The connection can then be closed without receiving entity data. This mechanism generates two copies of data traffic on another object storage service because CDN and OBS both request the file from this object storage service.
Serverless Upload
After a file is uploaded to another object storage service, you can use the function computing service to synchronize the file to Huawei Cloud OBS in serverless mode.
This architecture requires users to enable the function computing service in other clouds and deploy the code for uploading files to OBS, which will generate the function computing service fee.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot