Why We Built LiveKit
When the pandemic hit the US, a few of us started building online board games to play with newly far-flung friends. We wanted the experience to feel like sitting together at the same table, which meant adding real-time audio and video features.
This led us to WebRTC, a powerful peer-to-peer communications protocol—in truth, the intertwining of 9-10 subprotocols—with ubiquitous support across every major browser and mobile device. Unfortunately, working with it wasn't simple. You need to understand myriad low-level concepts and possess the correct incantations for things like signaling and coordinating connections amongst peers. Scaling WebRTC brings forth yet another set of challenges.
We found hosted solutions which abstracted away these difficulties, but most were designed specifically for Zoom-style meetings. Their APIs were rigid, prohibitively expensive at scale, and created vendor "lock-in"; once integrated, if they changed the rules later on, we'd be stuck.
We also evaluated every open source project out there. Greater flexibility and control came at the cost of a steeper learning curve, poor cross-platform support, less features and daunting deployment and scaling options.
Three things became clear:
- There was no open, easy-to-use (integrate, deploy, and scale), end-to-end WebRTC stack.
- In 5-10 years, real-time, multiplayer computing would be a part of every application.
- Many developers could benefit from infrastructure that made working with WebRTC easy and enjoyable.
So, we set out to build the WebRTC stack we'd originally searched for.
What is LiveKit?
LiveKit is a free, open source (Apache 2.0), opinionated, end-to-end real-time communications stack with first-party SDKs across every major software platform. It offers numerous features:
- Horizontally-scalable WebRTC Selective Forwarding Unit
- Modern, full-featured client SDKs
- JWT-based token authentication
- Backend APIs for complex workflows and low-latency coordination with the SFU
- Robust connectivity and networking over UDP, TCP, and built-in TURN
- A single, pure Go SFU binary for easy deployment
- Real-time speaker detection
- Simulcast, selective subscriptions and other automatic bandwidth management optimizations
- A universal egress and recording system for stream export
- Metadata, moderation, and data message APIs