iVibe.fans: A Serverless Media Router on Cloudflare Workers
A Streaming Router That Stores Nothing
A developer has launched iVibe.fans, a private streaming media routing service built entirely on Cloudflare Workers that stores zero content. Instead, it acts as an intelligent middleman — routing, scoring, and redirecting media requests in real time across the edge.
Built with the Hono web framework and deployed as a serverless application, the project showcases how modern edge computing can power sophisticated media delivery without traditional server infrastructure. The developer shared technical details in a recent post, revealing several clever engineering decisions worth examining.
Reverse Engineering Emby for Instant Poster Walls
One of the project's most interesting challenges involved media player compatibility. The developer initially tried simulating WebDAV protocol through Hono, but players like Infuse suffered from extremely slow metadata scraping speeds when mounting the service.
The solution was to reverse engineer Emby's API interfaces and simulate its metadata delivery logic. This approach allows players to connect via the native Emby protocol, achieving what the developer describes as 'sub-second' poster wall loading — a dramatic improvement over the WebDAV approach.
A 7-Layer Scoring System for Resource Quality
Rather than simply passing through any available media source, iVibe.fans implements an algorithmic quality filter. The system pulls metadata from multiple sources, then applies a multi-dimensional scoring model to rank available magnet links.
Key scoring dimensions include:
- Bitrate quality — higher resolution and bitrate sources score better
- Advertisement detection — sources with embedded ads are penalized
- Encoding group reputation — trusted encoding groups receive higher scores
- Compilation filtering — algorithm automatically removes compilations and spliced content
- Overall integrity — only the highest-scoring entry per title enters the catalog
This approach ensures users always receive the best available version of any given title without manual curation.
PikPak Load Balancing via 302 Redirects
The backend architecture leverages PikPak's cloud storage as a media delivery layer. The developer reverse engineered PikPak's login, offline download, and link retrieval APIs to build a custom integration.
To support multiple concurrent users, the service implements multi-account load balancing across several PikPak accounts. The flow works like this: a user hits play, the router assigns the request to the least-loaded PikPak account, triggers an offline cache of the magnet link, retrieves the direct streaming URL, and returns a 302 redirect to the player. The user's player then streams directly from PikPak's CDN.
This design means the Cloudflare Worker never handles actual media bytes — it only orchestrates the routing, keeping costs minimal and performance high.
Why the Architecture Matters
The project is a compelling case study in serverless media architecture. By combining Cloudflare Workers' global edge network with Hono's lightweight routing framework, the developer created a service that scales automatically, costs almost nothing to run, and requires no traditional server management.
Several architectural patterns here are broadly applicable:
- Protocol simulation — mimicking established APIs (like Emby) to leverage existing client ecosystems
- Edge-first routing — keeping all logic at the CDN edge for minimal latency
- Zero-storage design — acting purely as an orchestration layer rather than a content host
- Multi-provider load balancing — distributing requests across upstream service accounts
The developer notes that a movie-focused version is currently in development. While iVibe.fans is a personal project, its architecture offers a blueprint for anyone exploring serverless media delivery at the edge.
📌 Source: GogoAI News (www.gogoai.xin)
🔗 Original: https://www.gogoai.xin/article/ivibefans-a-serverless-media-router-on-cloudflare-workers
⚠️ Please credit GogoAI when republishing.