-
Notifications
You must be signed in to change notification settings - Fork 642
Multi Level Cluster
A cluster which has different regions is called Multi-Level Cluster where each region has its own origin for a stream. 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.
Let's clarify the the case with an example scenario. We have two scenarios
- Publisher & Players in the same cluster
- Publisher & Players in the different clusters
Let's remember the traditional scenario
-
Publisher
starts a stream and it is assigned to theOrigin1
instance in theRegion1
-
Player1
who is close toRegion1
instance requests to play the stream. -
Player1
is assigned toEdge11
instance to receive the stream inRegion1
- Since the
Origin1
is the origin of the stream,Edge11
will pull stream fromOrigin1
.
-
Player2
who is close toRegion2
requests to play the stream. -
Player2
is assigned toEdge21
instance inRegion2
-
Edge21
checks the origin of the stream.- Since there is no origin instance in
Region2
to play the stream. It assigns itself as the secondary origin for that stream inRegion2
. -
Edge21
pulls the stream from theOrigin1
(main origin) inRegion1
. -
Edge21
sends the stream toPlayer2
.
- Since there is no origin instance in
-
Player3
who is close toRegion2
requests to play the stream. -
Player3
is assigned toEdge22
inRegion2
. -
Edge22
checks the origin of the stream. SinceEdge21
is a secondary origin for the stream in theRegion2
, it pulls the stream fromEdge21
and serves toPlayer3
.
You can set the node group (or region) of a server in 2 ways:
You can set it as nodeGroup=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