-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
id: networking_firewall | ||
sidebar_position: 2 | ||
slug: /misc/networking | ||
title: Networking and Firewall | ||
--- | ||
|
||
Stream Video leverages a combination of UDP and TCP protocols to deliver real-time video streams. By default, Stream uses UDP, which is the preferred protocol for real-time video transmission via WebRTC. However, some users may encounter restrictions on UDP due to firewall rules or networking configurations. | ||
If UDP is unavailable, the system automatically falls back to TCP. Although TCP provides a viable alternative, it is less ideal for real-time video, as it may result in decreased video quality. | ||
|
||
For optimal performance, we recommend configuring firewalls to allow UDP and NAT as explained below. | ||
|
||
### Network and Port Requirements | ||
Stream Video operates on an edge infrastructure, with a dynamically managed list of servers for video call routing. Currently, it is not possible to retrieve a comprehensive list of Stream Video hostnames due to the evolving nature of this infrastructure. | ||
|
||
### Port Ranges Used by Stream Video | ||
|
||
**Signaling (HTTP and WebSocket over TLS):** | ||
- TCP 443 (Required for initial signaling) | ||
|
||
**WebRTC - TURN (Traversal Using Relays around NAT):** | ||
- TCP or UDP 3478 | ||
- TCP or UDP 32768 - 46883 | ||
|
||
**WebRTC - STUN (Session Traversal Utilities for NAT):** | ||
- UDP 46884 - 60999 | ||
|
||
### Firewall and NAT Considerations | ||
Real-time video experiences the best quality when using STUN over UDP. This setup requires allowing the designated UDP port range and configuring NAT (Network Address Translation) to work correctly on the user’s network. | ||
If a client cannot connect via STUN/UDP, the SDK automatically switches to TURN, using either UDP or TCP as needed. This allows clients to connect directly to the server via TCP if UDP is blocked or unavailable. | ||
TURN is also available over TCP for clients that are restricted from using UDP. | ||
|
||
### Recommended Firewall Rules | ||
To ensure compatibility and quality, configure the following rules: | ||
|
||
- Allow TCP 443 on `0.0.0.0/0` for initial signaling. | ||
- Enable NAT for optimal quality (recommended but not required). | ||
- Allow the full range of TURN and STUN ports (TCP and UDP) for best video quality and compatibility. | ||
|
||
This configuration ensures robust connectivity for all clients, maintaining the highest possible video quality across varying network environments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: rate_limits | ||
sidebar_position: 2 | ||
sidebar_position: 3 | ||
title: Rate limits | ||
--- | ||
|
||
|