Seamless Image Storage Migration to Qiniu Using qrsync and Mirror Storage
This article details how the high‑traffic mobile platform 糗百 migrated its massive image repository to Qiniu Cloud without service interruption, using the qrsync upload tool combined with Qiniu’s mirror storage to smoothly transfer cold data, handle hot data, and alleviate I/O bottlenecks.
QiuBai (糗百), a popular mobile entertainment platform, receives about 1 billion requests per day with peak traffic of 30 000 requests per second. Its self‑built image platform struggled with server overload, cross‑datacenter sync delays, and disk I/O bottlenecks.
To address these issues, QiuBai decided to migrate image storage to Qiniu Cloud and adopt Qiniu’s CDN service, aiming for a seamless transition without disrupting user experience.
Traditional migration would shut down the upload channel, make data read‑only, copy everything to the new storage, then switch the upload endpoint—causing long periods during which users could not upload content.
Qiniu’s solution combines the qrsync upload tool with mirror storage. First, qrsync transfers large amounts of cold data to Qiniu and switches image URLs to Qiniu’s domain. Hot data generated by users remains on the original platform, while mirror storage fetches missing resources from the source on demand, ensuring continuity.
The mirror storage acts as a cache: when a resource is not yet in Qiniu, the service pulls it from the original site once, stores it, and serves subsequent requests directly from Qiniu, eliminating repeated source fetches.
Later, QiuBai upgraded its backend so the new version uploads images directly to Qiniu, while the older app version still writes to the original platform. During this overlap, mirror storage continues to fetch any uncached images from the source, guaranteeing availability. Once all users migrate to the new version and source traffic drops to zero, the mirror can be removed.
Through this approach, QiuBai completed the image storage migration without users noticing, effectively resolving the disk I/O bottleneck.
How to use mirror storage:
Create a mirror bucket on Qiniu and set the source domain (e.g., img.example.com). The bucket will be assigned a Qiniu domain such as 7xiuqc.com1.z0.glb.clouddn.com.
Replace all external image URLs with the Qiniu domain.
If the site hosts user‑generated content, adjust the upload workflow to send new images to the Qiniu mirror bucket, making the original source read‑only.
Use the qrsync synchronization tool to copy all historical images to the Qiniu mirror bucket.
After these steps, the original image source can be decommissioned.
In conclusion, rapid data growth is a common challenge for many enterprises. Leveraging cloud services for scalable storage and performing migration without downtime are critical for future success. Qiniu’s storage, CDN, and mirror services provide robust support for such migrations, and future articles will explore its image and media processing capabilities.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architect
Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
