-
Notifications
You must be signed in to change notification settings - Fork 642
Multi Level Cluster
Ant Media Server can be scaled in different physical locations. You can set the node group parameter of the servers to create regions. Still you can make all nodes be in the same region by setting all node group parameters with the same value or using it with default. But separating the nodes into regions has some advantages in performance. Because each region will have their own origin node for a stream and the edges in a region will pull the stream from the origin of their region.
Lets clarify the the case with an example scenario.
- Publisher starts a stream and it is assigned to the Origin1 in the Region1.
- Lets say, Player1 who is closed to Region1 requests to play the stream.
- Player1 is assigned to Edge11 in Region1.
- Since the Origin1 is the origin of the stream, Edge11 will pull stream from Origin1.
- Until now, the scenario is one region cluster.
- Lets say, Player2 who is closed to Region2 requests to play the stream.
- Player2 is assigned to Edge21 in Region2.
- Edge21 checks the origin of the stream. Since it is not in its own region (Region2) it is assigned as the secondary origin for that stream in Region2. It pulls the stream from the Origin1 (main origin) in Region1. Also it is still an edge server so it servers the stream to Player2.
- Lets say, Player3 who is closed to Region2 requests to play the stream.
- Player3 is assigned to Edge22 in Region2.
- Edge22 checks the origin of the stream. Since Edge21 is a secondary origin for the stream, it pulls the stream from Edge21 and serves to Player3.
You can set the node group (or region) of a server in 2 ways:
You can set it as modeGroup=GROUP_NAME
in conf/red5.properties
file.
You can set it by calling POST Method AMS_URL/rest/changeServerSettings
and passing node group in JSON format as follows.
{"nodeGroup":"GROUP_NAME"}
You should configure the Load Balancer to forward Publish and Play requests to the best region. If you have a global cluster in different geolocations,you should have a Load Balancer like Route53.
- Introduction
- Quick Start
- Installation
- Publishing Live Streams
- Playing Live Streams
- Conference Call
- Peer to Peer Call
- Adaptive Bitrate(Multi-Bitrate) Streaming
- Data Channel
- Video on Demand Streaming
- Simulcasting to Social Media Channels
- Clustering & Scaling
- Monitor Ant Media Servers with Apache Kafka and Grafana
- WebRTC SDKs
- Security
- Integration with your Project
- Advanced
- WebRTC Load Testing
- TURN Servers
- AWS Wavelength Deployment
- Multi-Tenancy Support
- Monitor Ant Media Server with Datadog
- Clustering in Alibaba
- Playlist
- Kubernetes
- Time based One Time Password
- Kubernetes Autoscaling
- Kubernetes Ingress
- How to Install Ant Media Server on EKS
- Release Tests
- Spaceport Volumetric Video
- WebRTC Viewers Info
- Webhook Authentication for Publishing Streams
- Recording Streams
- How to Update Ant Media Server with Cloudformation
- How to Install Ant Media Server on GKE
- Ant Media Server on Docker Swarm
- Developer Quick Start
- Recording HLS, MP4 and how to recover
- Re-streaming update
- Git Branching
- UML Diagrams