Multi Level Cluster
What is 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. Separating the nodes into regions based on their physical location has some advantages in performance and data-transfer. Because each region will have their own origin node for a stream, the edges in a region will pull the stream from the origin of their region.
How does it work?
Let's clarify 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 & Players in the same cluster
Publisherstarts a stream and it is assigned to theOrigin1instance in theRegion1Player1who is close toRegion1instance requests to play the stream.Player1is assigned toEdge11instance to receive the stream inRegion1- Since the
Origin1is the origin of the stream,Edge11will pull stream fromOrigin1.

Publisher & Players in the different clusters
Player2who is close toRegion2requests to play the stream.Player2is assigned toEdge21instance inRegion2Edge21checks the origin of the stream.- Since there is no origin instance in
Region2to play the stream. It assigns itself as the secondary origin for that stream inRegion2. Edge21pulls the stream from theOrigin1(main origin) inRegion1.Edge21sends the stream toPlayer2.
- Since there is no origin instance in
Player3who is close toRegion2requests to play the stream.Player3is assigned toEdge22inRegion2.Edge22checks the origin of the stream. SinceEdge21is a secondary origin for the stream in theRegion2, it pulls the stream fromEdge21and serves toPlayer3.
In short: each stream is served via a single origin node per region, even across geolocations.
How to configure Multi-Level Cluster?
You can set the node group (or region) of a server by adding nodeGroup=GROUP_NAME in conf/red5.properties file. Make sure that the instances running in the same region should have the same nodeGroup value
Keep in mind that 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.
🧠 Multi-Level Cluster — One Platform, Global Reach! ⚙️
Success! Your Ant Media Server is now configured with a multi-level architecture — intelligent node grouping, regional origins, and seamless edge fallback are all working together.
With this setup, your infrastructure adapts dynamically to user location, minimizes latency, and scales globally without complexity. This is how world-class streaming platforms are built. 🚀📡