Appearance
Low-cost deployment
Bitstream does not need one big server. Each part can live where it is cheapest. This page says where each part fits, what does not work, and why.
Prices change
Every price here is approximate, in US dollars, at the time of writing. Providers change prices and free plans often. Check before you buy. Names are examples, not endorsements.
Where each part can live
| Part | Where | About |
|---|---|---|
| Panel (SPA) | Cloudflare Pages. See Panel on Cloudflare Pages. | Free |
| Panel edges | Small throwaway VPSes in front of the panel. If one is blocked or attacked, replace it. | US$3-5 per month each |
bs-control | A small VPS (Hetzner, Contabo) or Fly.io, Railway. | US$5-10 per month |
| PostgreSQL | Managed: Neon, Aiven, Supabase, DigitalOcean. Or on the control VPS. | Free to about US$20-50 per month |
| Redis | On the control VPS (cheapest), or managed: Aiven Valkey, Redis Cloud. | Free to about US$10 per month |
bs-node | Dedicated servers with a lot of included bandwidth. | This is the real cost |
Everything above the last row is small. Video traffic is the bill. A node that sends 1 Gbps all month moves about 300 TB. Pick node servers by included traffic and port speed, not by CPU.
What does not work
The control on serverless
Lambda, Workers, Vercel and similar platforms run code per request and stop it after. The control does not fit that:
- nodes keep long connections open to the control (the node channel on port 8443);
- background jobs run all the time: EPG refresh, scheduled backups, certificate renewal, license checks;
- player apps poll the client API often, so cold starts would be felt by every viewer.
Run the control as a normal long-lived process: a VPS, a container on Fly.io or Railway, or Kubernetes.
Nodes on hyperscaler clouds
AWS, Google Cloud and Azure charge for traffic that leaves their network, at about US$0.05-0.09 per GB. At 300 TB per month that is about US$15,000-27,000 for one busy node. A dedicated server with the same traffic included costs a small part of that. Keep nodes on providers that include bandwidth.
Keep it in one region
Put the control, PostgreSQL and Redis in the same region, ideally the same data center.
- Every play waits for Redis (a connection slot per viewer). Keep it under about 5 ms from the control.
- Many panel screens run several Postgres queries. Keep it under about 20 ms, or the panel feels slow. The control logs a warning when it is farther.
A free database in another continent is not free: your viewers and your admins pay for it in waiting time.
Managed PostgreSQL tips
- Require TLS:
sslmode=requireat least,verify-fullwhen the provider gives a CA file. - On Neon, turn off scale to zero for production. Use the pooled host (
-pooler) for the app and the direct host for migrations. The control finds the direct host by itself. See External Postgres and Redis. - Behind any other pooler in transaction mode, set the direct URL too.
Managed Redis tips
- Redis on the control VPS is the cheapest and the fastest. No persistence is needed.
- The control uses Lua scripts (
EVAL). Pick a service that allows them. - Plans priced per command, such as Upstash, look cheap at first. Each play and each heartbeat is a command, so the bill grows with viewers. Plans priced by memory are easier to predict.