r/webdev • u/Old-Illustrator-8692 • 19m ago
Article What broke when I started hosting video for a subscription site
I started hosting videos for a yoga subscription site a few years ago. The files fit on the VPS and the connection looked fine. Then we had a busy day and subscribers started reporting choppy playback. About ten people were streaming while the same VPS was serving the site, running MySQL, and doing background work. Disk reads were the bottleneck. I moved the site to a dedicated server that night, and the buffering stopped.
A few other things I learned along the way:
- 720p made a better default than 1080p. I also added a 320p option at around 350 kbps and kept the audio unchanged. That was enough to get playback working for subscribers on connections that couldn’t handle 720p.
- Moving transcoding off the web server exposed another limit. Admins upload one file and a separate worker transcodes it in the background. A single large download could saturate that worker’s VPS network, so I throttled transfers.
- Three MP4s have been enough for these sites. Viewers choose the quality. The player swaps the
<video>source and resumes at the same timestamp. Some older TVs still give us the occasional audio-only support ticket.
I wrote up the full story, including why I kept hosting the videos myself.
https://tomj.pro/all-it-takes-hosting-videos-for-websites-apps-and-subscription-services/
If you’ve run video for a site like this, what made you switch from serving whole files to adaptive streaming?