How We Boosted CDN Stability by 80% with Automated Testing and Dual Architecture
This article details how test development engineers tackled CDN stability challenges by implementing a dual overseas architecture, automated backend interface validation, and a data‑driven front‑end image detection pipeline, achieving an 80% efficiency gain and minute‑level issue detection.
Introduction
As test development engineers, we ensure online service quality; CDN stability directly impacts user experience. Recent challenges in CDN testing were overcome with automation, and the international CDN architecture offers new insights.
International CDN Dual Architecture
Full Overseas Architecture
All resources are stored in S3 in Singapore and Oregon, delivered via AWS CDN → AWS S3. Korea uses AWS CDN → Tencent Cloud overseas CDN → Tencent Cloud COS (Shanghai) to balance performance and cost.
Dynamic Overseas Architecture
For large amounts of resources stored in Tencent Cloud that are hard to migrate, we asynchronously move data to overseas nodes on first access, using AWS CDN → Tencent Cloud overseas CDN → Tencent Cloud COS to ensure efficient distribution.
Why CDN Stability Is Critical for Test Development
High‑frequency change risk : frequent online config changes make manual regression inefficient.
Data black box : lack of systematic CDN image detection leads to delayed issue discovery.
User experience impact : image loading failures cause page stalls and affect key business metrics.
These challenges require automated testing and data monitoring.
Automated Backend Interface Validation
Core Idea
Focus on representative “open scheme” scenarios covering most CDN domains.
Filter requests by resourceType to capture image requests.
Validate HTTP status codes (200/206/304) and flag anomalies.
Core Code Implementation
Define domain prefixes and arrays for allUrls and non200Urls.
Listen to response events, collect URLs and status codes.
Log counts and assert that at least one URL is matched and all have acceptable status codes.
Front‑End Image Detection: Data‑Driven Quality Guard
We built a pipeline for data collection, rule validation, and automatic alerts.
Technical Solution
Automated data collection using evaluate to get natural size, element size, etc.
Intelligent analysis model calculates aspect ratio, file size, and detects abnormal cropping or oversized images.
Real‑time alert via robot pushes anomalies to developers.
Core Functions
a. getImgAndInput – finds
and background‑image elements, filters by domain (kujiale, coohom), fetches image info, and records URLs.
b. getImageInfo – uses img.evaluate to obtain src, natural dimensions, element dimensions, and sends a HEAD request to get content‑length and content‑type.
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.
