Self-hosted video or a video API: choosing for a telehealth or consultation app
Apps for online consultations, such as physiotherapy, tutoring or advisory sessions, live or die by the call. If the video doesn't connect, nothing else in the product matters.
There are two broad ways to build it: pay a hosted video API per minute, or run your own WebRTC media servers. Both work. This guide sets out how to choose, and what self-hosting really involves.
1. The two options
A hosted video API gives you SDKs and a global network of media servers. You add calls to your app quickly and pay for usage, usually by participant minute.
Self-hosting means running open-source WebRTC media servers, typically a selective forwarding unit (SFU) and a TURN relay, on your own infrastructure. You pay for servers and bandwidth instead of minutes, and you own the operations.
2. When a video API usually wins
A hosted API is the sensible default when you need to launch quickly, when call volume is still small or unpredictable, or when users are spread across many regions.
- You need calls working in weeks, not months
- Usage is low or unknown, so per-minute pricing stays modest
- Users are spread worldwide and need nearby media servers
- No one on the team wants to operate real-time infrastructure
3. When self-hosting usually wins
Self-hosting starts to make sense when calls are central to the product and volume is steady, so per-minute charges become a large, growing line on the bill. It also helps when you need control over where media flows and how sessions are recorded.
- Call volume is steady and per-minute costs dominate
- You want media to stay on infrastructure you control
- You need custom behaviour, such as session rules tied to bookings
- The team can monitor and operate servers, or has a partner who does
4. What self-hosting really requires
The media server is the easy part. Most of the work is making calls connect on real networks and knowing when they don't.
- A TURN relay, so calls connect from mobile data and strict office or hospital networks
- TLS everywhere, including the signalling connection
- Session access tied to the booking: only the right patient and practitioner can join, only in the slot
- Monitoring of connection failures, relay usage and call quality
- Automated tests that create a booking, join from two clients and check media flows
- Capacity planning, because one server carries a limited number of concurrent calls
5. Privacy and health data
With either option, treat call access and records as sensitive. Decide where recordings are stored, who can access them and how long they are kept, and log who joined each session.
If you operate under health-data rules in your market, check them against the specific provider or setup you choose. Neither option is compliant or non-compliant by itself; the configuration and your processes decide that.
6. A practical path
Many teams start with a hosted API to validate the product, then move to self-hosted media once volume is steady and the cost is clear. Keep the video layer behind your own interface from the start, so switching later changes one component rather than the whole app.
Common questions
Is self-hosted video cheaper than a video API?
Often at steady, high call volume, because you pay for servers instead of minutes. At low or unpredictable volume a hosted API is usually cheaper once you count the engineering and operations time.
Why do video calls fail on some networks?
Strict firewalls and mobile networks block direct peer connections. A TURN relay forwards the media so the call still connects. Any self-hosted setup needs one.
Can I switch from a video API to self-hosted later?
Yes, if the app talks to video through your own interface rather than calling the provider's SDK everywhere. Plan for that boundary from the start.
Related service
Build products customers can rely on.
Product EngineeringMore guides
- 01 — BUILD
React Native or Flutter: how to choose for your product's app
React Native vs Flutter for your product's mobile app: team skills, code sharing with web, UI approach, native SDKs, hiring, maintenance and store release.
- 01 — BUILD
How to reduce cloud costs without losing recoverability
A practical approach to cutting cloud infrastructure costs: measure first, right-size, remove idle services, and keep backups and recovery intact.
- 01 — BUILD
Managed or self-hosted database: a per-workload decision
How to choose between a managed and a self-hosted database: cost, operational effort, failover, backups and team skills, decided per workload.
- 01 — BUILD
Why a stopped AWS database comes back on, and how to retire it properly
Stopped RDS, Aurora and DocumentDB clusters restart on their own after seven days. How to retire an old database safely, and find the other leftover costs.
- 01 — BUILD
Moving a live app to new infrastructure: a cutover checklist
How to move a live application and its data to new infrastructure without losing anything: discovery, rehearsal, verification, cutover and rollback.
- 01 — BUILD
How to design role-based access for operations software
How to design role-based access control for operations software: permissions, deny by default, server-side checks, custom roles, scoping and audit.
- 01 — BUILD
Rolling out access control on a live system: log mode first
How to introduce role-based access control into a live business system without disruption: catalogue routes, map roles, run in log mode, then enforce.
