
Building a Multi-Region Video Platform Serving Asia-Pacific Markets
When I set out to build TopVideoHub , a video discovery platform covering 9 Asia-Pacific regions, I had to design an architecture that could fetch, store, and serve trending video data from Japan, South Korea, Taiwan, Singapore, Vietnam, Thailand, and Hong Kong — alongside the US and UK. Here's how I built it with PHP 8.3, SQLite, and LiteSpeed. Architecture Overview The platform has three main components: Data Pipeline — Cron-based fetcher that pulls trending videos from YouTube Data API v3 per region Storage Layer — SQLite database with FTS5 for multi-language search Serving Layer — LiteSpeed with three-layer caching for sub-100ms responses The Data Pipeline Each region has its own fetch cycle. The fetcher runs on staggered cron schedules to distribute API quota usage: <?php // fetch_videos.php — Called by cron declare ( strict_types = 1 ); require_once __DIR__ . '/app/Database.php' ; require_once __DIR__ . '/app/YouTubeApi.php' ; require_once __DIR__ . '/app/QuotaManager.php' ; $db
Continue reading on Dev.to Tutorial
Opens in a new tab


