LearnBase
Back to Blog

We moved our video from Bunny to Rehelios: average speed was never the problem

We migrated LearnBase's video hosting from Bunny Stream to Rehelios. Here's the real problem we had, how we measured it with our own benchmark, and what changed for students.

Agustin Garcia

For a good while, LearnBase's video hosting ran on Bunny Stream. It worked. Then a student emailed us that one video took "like ten seconds" to start, in the exact lesson he cared about most. Your first instinct is to blame the user's connection. We played it from our side and saw the same thing: once every so often, the player would sit there for several seconds before showing the first frame.

That email is what made us look at the problem seriously, and eventually move all of our video to Rehelios.

Average speed was never the problem

The confusing part about Bunny was that most of the time it started fast. Open ten videos in a row and nine flew. The tenth didn't. As a course creator that's the worst kind of bug: you can't reproduce it on demand, but your student lives it.

The cause turned out to be infrastructure. The Bunny edge we were assigned serves from Argentina, but its origin storage sits in Brazil. When a video segment was already cached at the edge, fine. When it wasn't —a rarely-watched video, or one just uploaded— the first request had to travel all the way to the origin in Brazil and back. That's where the one-, two-, and worst-case ten-plus-second spikes came from.

Rehelios serves from Cloudflare's Buenos Aires PoP without that cross-border hop. That was the hypothesis. Before migrating everything, we at LearnBase wanted numbers, not a hunch.

How we measured it

We built a benchmark that times the real HLS startup chain for the same videos on both providers:

master.m3u8  →  lowest-quality variant  →  first segment

That's exactly the sequence the player runs when you hit play, and we timed it starting from the lowest rendition, which is the strategy our player uses to get the video going as fast as possible.

One detail that matters more than it looks: we made every request with curl on a fresh connection, not with fetch. fetch pools connections, so the first request pays DNS + TCP + TLS (around 350 ms) while later ones ride the already-open socket. If you're not careful, that artifact makes one provider look five times slower for reasons that have nothing to do with the CDN. A fresh connection per request puts both on equal footing, at the honest worst case.

The results

12 videos, 4 iterations each, fresh connection per request:

MetricRehelios (median / p95 / max)Bunny (median / p95 / max)
Master TTFB74 / 82 / 98 ms93 / 2,436 / 19,120 ms
Startup chain225 / 245 / 251 ms258 / 2,570 / 19,312 ms

It's worth being honest about what these numbers show: at the median they're basically tied. With the segment warm in cache, Bunny starts as fast as Rehelios. If you only look at the average, the migration looks like it wasn't worth it.

The story is in the tail. Rehelios' p95 stays at 245 ms and its worst single measurement was 251 ms. Bunny's climbs to 2.5 seconds at p95 and past 19 seconds at the max. Those are precisely the cases our student was hitting: the cold video, the one nobody touched in a week, the one opened for the first time right after upload.

For a course that's not a row in a table. It's the difference between someone staying on the lesson or closing the tab thinking the platform is broken.

What we also tuned on the player side

The CDN migration was half the work. In parallel we tuned the player:

  • It starts at the lowest quality and steps up on its own when bandwidth allows, so the first frame shows sooner.
  • We capped how much buffer it loads ahead, so it doesn't fight startup for bandwidth.
  • We preload only the video metadata, not the whole thing.
  • We dropped a token refresh that ran more often than needed and added latency for nothing.

None of those fix an origin 3,000 km away. But stacked on top of Rehelios' edge, startup went from "fast almost always" to even and predictable.

Takeaway

Bunny isn't a bad product, and average speed was never the issue. What we couldn't live with on a course platform were the multi-second spikes in the worst case, and the cause was the hop from edge to an origin in another country.

Rehelios gave us stable startup: p95 under 250 ms and, above all, none of those long stalls. If you're choosing where to host video for an LMS, our advice is to ignore the average. Look at the p95 and the worst case, because that's what your students actually feel.