Waterbus is an open-source platform for building scalable, real-time conferencing systems using WebRTC. It enables low-latency streaming of video, audio, and data for applications like video chat, collaborative tools, and multiplayer experiences.
The server is written in Rust, using the native WebRTC.rs implementation to maximize performance, safety, and control over media flow.
-
📚 Publish/Subscribe Media Tracks
Flexible pub/sub model to let users publish and subscribe to video/audio streams dynamically.
-
🎥 Simulcast with Bandwidth Awareness
Uses simulcast to send multiple video layers per publisher. Waterbus leverages REMB (Receiver Estimated Maximum Bitrate) feedback to monitor subscriber bandwidth and forwards only the most suitable video quality for each participant.
-
📈 Scalable by Design
Optimized to scale horizontally,
Waterbus
supports thousands of concurrent users with efficient SFU architecture and Redis-based signaling. -
💬 Built-in Chat Messaging
Integrated text messaging alongside media streams — perfect for chat, reactions, or control messages.
-
🌍 Cross-Platform Compatibility
Works across browsers, native apps using WebRTC standards.
This project uses the following technologies:
- Rust
1.82+
- PostgreSQL
16+
- Redis
7+
- Typesense
v0.27.1+
Get up and running with Waterbus in just a few steps.
- Connect to your PostgreSQL database and run the schema file:
psql -h <postgres-host> -U <postgres-user> -d <database-name> -f schema.sql
- Start by cloning the Waterbus server repository:
git clone https://github.com/waterbustech/waterbus-rs.git
cd waterbus-rs
- Rename the example .env file to configure your local environment:
mv example.env .env
- Build & Run the Server
cargo run --release
If you prefer to use Docker:
- Build the Docker image:
sudo docker build --platform=linux/amd64 -t <image-name> .
- Run the container with necessary ports exposed:
sudo docker run --env-file .env -p 5998:5998 -p 5998:5998/udp -p 19200-19250:19200-19250/udp <image-name>
While NestJS served us well in the early stages, we encountered limitations when scaling up real-time media workloads:
- Performance: Rust provides native-level speed, predictable memory management, and zero-cost abstractions — ideal for a real-time system.
- Control: Media routing, simulcast, congestion control, and fine-grained memory management are all more accessible and performant in a systems language.
- Safety: Rust’s ownership model ensures memory safety and eliminates entire classes of bugs (nulls, races, leaks).
- Concurrency: Rust's async ecosystem (Tokio, etc.) is well-suited to handling thousands of concurrent connections with minimal overhead.
This migration enables us to build a high-performance WebRTC SFU, tailored exactly to our needs.
Simulcast allows a publisher to send multiple versions of the same video stream at different resolutions and bitrates (e.g., 1080p, 720p, 360p).
Waterbus uses the following approach:
- Client Encodes Multiple Layers → Sender sends low, mid, and high-quality streams.
- REMB Feedback from Receiver → Each subscriber sends Receiver Estimated Maximum Bitrate (REMB) reports.
- Adaptive Stream Forwarding → The server uses REMB to dynamically forward the most suitable layer for each subscriber, ensuring the best quality without overloading their connection.
This provides a responsive, bandwidth-efficient experience, especially in group calls with diverse devices and network conditions.
If you like what we're building, consider showing your love by giving us a ⭐ on Github!
Also, follow maintainers on GitHub for our next creations!
We welcome all contributions — big or small!
Whether it’s fixing a bug, suggesting a feature, or improving documentation, your input helps Waterbus
grow.
- Fork the repo, make your changes, and open a pull request
- Spot an issue? Open a GitHub Issue — we’d love to hear from you
Let’s build the future of real-time communication together 🚀
- 📢 waterbus.tech: Home page to introduce products and features.
- 🌍 meet.waterbus.tech: Demo of
Waterbus
for online meetings - 📖 developer docs: Everything you need to integrate and extend Waterbus
Waterbus is open source under the Apache 2.0 License. Use it freely, fork it, build amazing things.
Got questions, feedback, or ideas? Reach out anytime at [email protected]
Made with 💙 by the Waterbus Team.