Understanding edge/origin setup and load balancing question.

Trying to get a better conceptual view of how this works. My understanding is that using multiple edge servers and load balancing allow the client demand to be distributed based on edge server load.

How does this work? We are using rtsp to perform live camera streaming, which I guess is handled by the origin server. When a client wants a video the link is to a specific IP or Host. I’m assuming that the Host address is one of the edge servers. How does load balancing redirect the client from one edge server to another edge server for the purpose of balancing?

JohnA

Hi there.

The thing to understand first is that the Livestream Repeater (origin/edge) system is one thing, and load balancing is another. Completely separate. They are used together obviously, but are separate systems.

A LB Listener and one or more LB Senders is the load balancing system. An Origin and one or more Edge servers is the liverepeater system.

Typically, an Origin server is also used as the LB Listener. But that is not necessary for this to work, it’s just typical and convenient.

On the other hand, a LB Sender is always also an Edge server, it doesn’t work if these roles are not paired.

An Origin server is what you publish a stream to. Edge servers restream from the Origin. So this is how streams are distributed.

A LB Listener redirects connections to the LB Senders (which are always also Edge servers).

So the thing to do is set up an Origin server, then setup one Edge server. Test that by publishing a stream to the origin server playing it from the edge. Then setup the Load Balancing system: A Load Balancer Listener, and Load Balancer Senders on the Edge. Then add Edge Servers and Load Balancer Listeners as necessary.

Clients get “least loaded server” from the LB, then they initiate streaming with that edge. The LB is not involved beyond that, no involvement with streaming at all.

I hope this helps.

Salvadore

Hi,

Did you read the “How to get Dynamic Load Balancing AddOn” forum article? It has been recently updated with some new information and a new Load Balancer addon package.

You should be able to get answers to your questions there, as it contains lots of information about the Wowza Media Server and Wowza Streaming Engine load balancers.

Zoran

Hi John,

HTTP clients are redirected using the HTTP 302 response status code. Your client must support the HTTP 302 code for load balancing to work. RTMP clients that use HTTP requests must support the

returned XML.

The following is an example for generating XML output for use in some Flash-based players:

http://[load-balancer-ip-address]:1935/redirect/[application-name]/[streamname]/
loadbalancer.smil

In this example, an RTMP client using HTTP requests gets XML returned similar to:

<?xml version="1.0"?>
<smil>
<head>
<meta base="rtmp://[load-balanced-server-ip-address]:1935/[application-name]/" />
</head>
<body>
<switch>
<video src="[stream-name]" />
</switch>
</body>
</smil>

You can find this information and more in the WowzaDynamicLoadBalancingAddOn_UsersGuide.pdf that ships with the AddOn.

I hope this helps answer your questions.

Kind regards,

Salvadore

Thanks for attempting to answer my question Salvadore, but unfortunately everything you posted was already apparent to me. The main question I had was how do clients get directed to the least loaded edge server. As it stands right now I supply the client a host address to the server. If that server turns out to not be the one delivering the video, then how does the client get redirected to the server that will?

"How does load balancing redirect the client from one edge server to another edge server for the purpose of balancing?"

I guess the answer I’m looking for would be…

“Load balancing redirection is handled by the server’s interaction with players supporting HLS, RTMP, and RTSP protocols”

Would that be a correct assumption? IOW, if I instruct VLC, JWPlayer, or a Safari browser to play a video from a specific host address does the redirection get automatically handled by the player transparent to me? It appears that is what the article is saying. I just like to have a handle on the implementation specifics to I can intelligently answer anticipated questions even if it doesn’t take any specific action on my part when coding up the web page with the player.

Just found this page, which helps answer the question…

https://www.wowza.com/docs/how-to-redirect-an-http-or-rtsp-session-through-server-side-code

along with a caveat…

“Not all RTSP and HTTP players support redirects.”

I’m guessing that load balancing depends on using a player that supports redirection.

JohnA