Skip to main content
  1. Projects/

Video on Demand Leveraging AWS CloudFront

From DigitalOcean to AWS
From DigitalOcean to AWS

Executive Summary #

A South Korean Video-on-Demand (VOD) provider faced critical scaling challenges with their legacy DigitalOcean infrastructure. As traffic surged, resource contention between video transcoding and web serving caused frequent slowdowns and downtime, resulting in an availability rate of only 96-97%. Furthermore, the client struggled with bandwidth theft (hotlinking) and an inability to efficiently target their specific Asian markets.

By migrating to a decoupled, high-availability architecture on AWS, we separated the video processing pipeline from the WordPress application layer. The new solution utilizes Auto Scaling, Aurora Serverless, and Elemental MediaConvert to achieve 99.9% availability, strict geographic content control, and a seamless user experience across South Korea, Japan, Malaysia, Vietnam, and Indonesia.

The Client #

The client is a specialized VOD platform based in South Korea. They rely on a heavily customized WordPress environment with bespoke themes and plugins developed by their internal IT team. Their business model relies on serving high-quality streaming content to a specific target audience in East and Southeast Asia.

The Challenge #

Hosting on a single DigitalOcean Droplet worked during the startup phase but became a bottleneck as the user base grew. The architecture suffered from three primary issues:

  1. Resource Contention (The “Noisy Neighbor” Effect): The WordPress application and video transcoding jobs shared the same CPU and RAM. When a new video was uploaded for conversion, the web server would choke, causing slow page loads for end-users.
  2. Geographic Latency & Waste: The server was located in South Korea, offering poor performance for viewers in Southeast Asia. Conversely, the client was paying for bandwidth consumed by traffic from non-monetizable regions (e.g., Europe/USA).
  3. Content Theft: The client lacked effective hotlink protection. Third-party sites were embedding the client’s video links, driving up bandwidth costs without generating revenue.
  4. Legacy Constraints: The internal team mandated that WordPress remain the CMS due to significant prior investment in custom development.

The Solution: Architecture Overview #

We designed a cloud-native architecture hosted in the AWS Asia Pacific (Seoul) Region to minimize latency for the primary user base. The solution focuses on decoupling the compute-intensive video processing from the user-facing application.

VOD Architecture Diagram on AWS

1. Network & Compute (High Availability) #

  • VPC Structure: Constructed a custom VPC with High Availability across two Availability Zones (AZs). The network consists of 2 Public Subnets (for ALBs/NAT Gateways) and 4 Private Subnets (for Application and Data layers).
  • Compute Logic:
    • Launch Templates: We utilized AWS Graviton (t4g.large) instances for the best price-to-performance ratio.
    • Savings Plans: Baseline traffic is handled by reserved instances covered by a Savings Plan.
    • Auto Scaling Group (ASG): During weekends and holidays, the ASG automatically provisions on-demand instances to handle bursts, scaling down when traffic subsides.
  • Shared Storage: Implemented Amazon EFS mounted to all instances, ensuring WordPress core files and uploads are synchronized across the fleet instantly.

2. Database & Caching (Serverless Scale) #

  • Database: Migrated MySQL to Amazon Aurora Serverless (MySQL Compatible).
    • Configuration: Configured with a “Scale to Zero” policy (0 ACUs min / 10 ACUs max). This ensures the client pays purely for usage, with the database automatically pausing during low-traffic periods (e.g., 3 AM - 5 AM).
  • Caching: Deployed Amazon ElastiCache Serverless (Valkey) across 2 AZs. This offloads read/write intensity from the database, significantly speeding up WordPress php processing.

3. The Video Pipeline (Decoupled & Event-Driven) #

We completely removed video processing from the web servers.

  1. Ingest: Admins upload raw video files to a private Source S3 Bucket which would act both as source bucket and a backup archive as the video objects would get S3 Glacier Deep Archive class after 7 days.
  2. Trigger: S3 Batch Operations invoke an AWS Lambda function.
  3. Process: Lambda triggers AWS Elemental MediaConvert to transcode files into adaptive bitrate streams (HLS).
  4. Storage: Processed videos are stored in a Destination S3 Bucket, ready for streaming.

4. Content Delivery & Security #

  • CDN: Amazon CloudFront was deployed to cache video segments at edge locations nearest to the users (KR, JP, MY, VN, ID).
  • Geo-Blocking (WAF): We implemented AWS WAF rules to strictly allow traffic only from the target countries. Traffic from non-monetizable regions is blocked at the edge, saving significant bandwidth costs.
  • Hotlink Protection (CORS): Configured strict CORS and Referer headers. CloudFront validates that the request originates strictly from the client’s domain. Direct link access and unauthorized embedding are blocked.

5. Supporting Infrastructure #

  • DNS: Migrated from Cloudflare to Amazon Route53 for tighter integration with AWS resources and lower latency routing.
  • Email: Migrated SMTP services to Amazon SES to ensure high deliverability of transactional emails (password resets, subscription notifications).

The Results #

The migration has transformed the operational stability of the platform.

  • Availability: Uptime increased from 96% to 99.9%. The decoupling of video processing means admins can upload bulk content on weekends without impacting site performance for viewers.
  • Performance: By moving to Graviton instances and ElastiCache, page load times improved by 40%.
  • Cost Efficiency: While the raw AWS infrastructure cost is higher than the previous single-server setup, the Total Cost of Ownership (TCO) has improved. The client is no longer paying for pirated bandwidth (hotlinking blocked) or traffic from non-target countries (WAF blocking), and the revenue preserved by eliminating downtime far exceeds the infrastructure costs.
  • Scalability: The platform now handles holiday traffic spikes autonomously, removing the need for manual server intervention.

Conclusion #

This project demonstrates that legacy CMS applications like WordPress need not be a barrier to modern cloud performance. By leveraging AWS managed services—specifically Aurora Serverless, EFS, and Elemental MediaConvert—we modernized the client’s infrastructure without requiring a rewrite of their core application code. The result is a secure, highly available, and geographically optimized VOD platform ready for future growth.