Building a Multi-Region Video Platform Serving Asia-Pacific Markets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MyrinNew
    Senior Member
    • Feb 2024
    • 5168

    #1

    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:

    1. Data Pipeline — Cron-based fetcher that pulls trending videos from YouTube Data API v3 per region
    2. Storage Layer — SQLite database with FTS5 for multi-language search
    3. 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:






Working...