Technology & WebRTC
Krona.Chat is built on live WebRTC streaming over the free, open-source Janus media server. We developed load balancing of media streams across Janus servers ourselves: streams are distributed automatically across hundreds of servers in different regions, while latency stays under a second.
Janus — a free, open-source WebRTC media server
Streams run through Janus WebRTC Server, an open-source media server. It's free: there are no licence fees at launch or as the number of servers, models and viewers grows.
Janus works as an SFU (Selective Forwarding Unit): one incoming stream from a model is forwarded to many viewers without re-encoding for each of them. So a single media server can carry a large audience, and video reaches viewers with minimal latency.
Media stream load balancing across Janus servers
Janus itself can't distribute streams across servers — we built media stream load balancing into the Krona.Chat platform. With it, media servers work as one cluster:
Hundreds of servers
Load can be spread across hundreds of media servers — more broadcasts and viewers are covered by adding servers.
Automatic geo distribution
Streams are distributed automatically across servers in different regions, closer to models and viewers.
Automatic stream recovery
Any server can be rebooted: every stream it was serving comes back up automatically.
No-downtime server changes
New servers are easy to add to the cluster, and any server can be taken out of it for maintenance.
No alternative on the market
There are no ready-made cam platforms with multi-server WebRTC stream balancing on a free media server: known solutions run on a single media server and can't scale by adding servers.
The Krona.Chat multi-server solution wins on technology and on cost of ownership: you pay no media server licences, and low-latency video is delivered through your own servers rather than an expensive CDN billed per gigabyte.
WebRTC instead of HLS: live video with no lag
With HLS or DASH streaming, video reaches viewers tens of seconds late. WebRTC delivers the stream in real time, with sub-second latency. For a cam site that's critical: the model's reactions to chat, tips and Lovense toys, and private and group shows only work live.
Streaming and watching in any browser
- viewers watch in the browser on a computer (Windows, macOS, Linux) or a phone or tablet (Android, iOS) — no plugins or apps;
- models go live straight from the browser — on a computer or a phone, see the model dashboard;
- video quality adapts to each viewer's connection speed without interrupting the stream for others.
Platform technology stack
The technologies and languages the Krona.Chat cam platform is built on:
ReactJS
The front end of the platform's sites: the cam site, model and partner areas.
WebRTC
Live video and audio in the browser with sub-second latency.
Janus
A free, open-source WebRTC media server that works as an SFU.
Krona.Chat media balancer
Our own development: distributes media streams across Janus servers by region.
Cloudflare
Web traffic load balancer for the platform's sites.
PHP 8.5
The platform's server-side language.
C
Handling media streams and working with the Janus server.
MariaDB 11.x / 12.x
The platform's relational database.
Galera Cluster
A MariaDB Galera cluster of at least three servers for a resilient database.
How many media servers does a cam site need?
As a guide, one dedicated media server with a guaranteed 1 Gbit/s port gives about 700 Mbit/s of usable bandwidth under sustained load. The number of servers depends on concurrent broadcasts, viewers and the chosen quality — from 480p to 4K.
Size your setup for your load with the server calculator.
WebRTC and media server questions
Which media server does Krona.Chat use?
Janus WebRTC Server — a free, open-source media server that works as an SFU. There are no media server licence fees, however many servers the cluster has.
How does WebRTC stream balancing across servers work?
The Krona.Chat platform load-balances media streams across Janus servers. Streams are distributed automatically across media servers in different regions, and a cluster can run hundreds of servers.
What happens if a media server reboots?
Every stream that server was serving comes back up automatically. New servers can be added to the cluster, and any server can be taken out for maintenance.
Why WebRTC rather than HLS?
WebRTC delivers video in real time with sub-second latency, while HLS lags by tens of seconds. For a cam site, live interaction between model and viewer — chat, tips, private shows — is only possible with WebRTC.
How many servers does a cam site need?
As a guide, about 700 Mbit/s of usable bandwidth per media server with a 1 Gbit/s port. The exact number depends on broadcasts, viewers and video quality; the server calculator gives an estimate.
What technology stack is the platform built on?
Front end — ReactJS, video — WebRTC, media server — Janus with the Krona.Chat media balancer, web traffic balancing — Cloudflare, server-side language — PHP 8.5, media streams and Janus — C, database — MariaDB 11.x / 12.x in a Galera cluster.
What does low-latency video delivery cost?
The Janus media server is free, and video is delivered through your own servers at a fixed bandwidth cost rather than through a CDN billed per gigabyte. That keeps the cost of owning media servers and delivering low-latency video low even as the audience grows.