Skip to content
Ignacio Perales

Servers, CDNs and video delivery

I run the servers, CDN and storage behind a private video platform with 10+ TB of content and 2+ TB of traffic a month.

I built a private community video platform on my own and co-own it. It runs on multiple servers behind a CDN, with S3-compatible object storage, and serves 400+ paying members. I also run Linux servers and a self-hosted CI/CD server, work with several CDNs, and have delivered freelance projects since 2020.

Where I've used it

Private community video platform

Anonymized · no name or link

Own

A private video platform for a community with paying members. I co-own it and built it on my own.

Built

  • Multiple servers behind a CDN, with the video library in S3-compatible object storage.
  • A video pipeline that includes a desktop tool to burn in subtitles, built with Electron and FFmpeg.
  • A NestJS backend on MongoDB and Redis, with revocable sessions (JWT and Redis).
managed storage
10+ TB
bandwidth per month
2+ TB
paying members
400+
registered users
3k+
  • NestJS
  • MongoDB
  • Redis
  • CDN
  • S3-compatible storage
  • Electron
  • FFmpeg

Freelance and own projects

Anonymized · no name or link

Freelance

The servers, CI/CD and CDNs behind my freelance and own projects.

Built

  • Linux servers in production with nginx, Docker, pm2, and Supervisor with Gunicorn.
  • A self-hosted CI/CD server running OneDev.
  • Content delivery through Bunny, Akamai and Cloudflare CDNs.
  • Dynamic DNS automation.
  • Linux
  • nginx
  • Docker
  • pm2
  • Supervisor
  • Gunicorn
  • OneDev
  • Bunny CDN
  • Akamai
  • Cloudflare

Freelance clients

Anonymized · no name or link

Freelance2020 → now

Several clients with very different needs.

Built

  • Projects ranging from simple portfolio pages to content-distribution networks across multiple servers, accelerated with CDNs.
  • CDN

Architecture

Video platform. Multiple servers sit behind a CDN, and the video library lives in S3-compatible object storage: 10+ TB managed, with 2+ TB of bandwidth a month. The backend is NestJS with MongoDB and Redis, and sessions are JWTs that can be revoked through Redis. Videos go through a pipeline that includes a desktop tool I built with Electron and FFmpeg to burn in subtitles.

Servers and tooling. In production I run Linux servers with nginx, Docker, pm2, and Supervisor with Gunicorn. Builds and deploys go through a self-hosted CI/CD server (OneDev). I have worked with Bunny, Akamai and Cloudflare as CDNs, and I automated dynamic DNS.

Freelance. Since 2020 I have built projects for several clients, from simple portfolio pages to content-distribution networks across multiple servers, accelerated with CDNs.

Video platform · Delivery

    • CDN
    • ServersNestJS, MongoDB, Redis
    • S3-compatible object storagevideo library, 10+ TB

Servers and tooling · Deploys

    • OneDevself-hosted CI/CD
    • Linux serversnginx, Docker, pm2, Supervisor with Gunicorn
  • Service
  • Several instances
  • Storage
  • External

Multiple servers sit behind a CDN, and the video library lives in S3-compatible object storage, so the CDN and storage carry the bytes while the servers handle the application. Builds and deploys go through a self-hosted CI/CD server (OneDev) to Linux servers running nginx, Docker, pm2, and Supervisor with Gunicorn.

Demo

Interactive diagram

Journey of a request

A diagram that follows one request from DNS to the CDN edge, the origin servers and storage, next to the deploy pipeline of this site.

Coming soonThis demo isn't built yet. The title and description above say what it will show.

Decisions & lessons

  1. Let the CDN carry the bytes. With 2+ TB leaving every month, the CDN and object storage do the heavy lifting, and the servers handle the application.
  2. Sessions must be revocable. A JWT alone can't be taken back before it expires. Keeping session state in Redis makes it possible to end a session right away.

Stack

  • Linux
  • nginx
  • Docker
  • pm2
  • Supervisor
  • Gunicorn
  • OneDev
  • Bunny CDN
  • Akamai
  • Cloudflare
  • S3-compatible storage
  • FFmpeg
  • Electron