Results 1 to 9 of 9

Thread: Load Balancing edge-origin

  1. #1

    Default Load Balancing edge-origin

    Hi there.

    We've been using a load balancing setup where there's a single primary server that runs the origin, load balancer, and edge applications, and when we start up edge servers to handle a large load, they connect to it. This has been working well, but as we expand, the primary server gets connections for every stream times every edge server. So for 20 streams and 20 edges, it has 400 connections.

    To fix this, we're first moving the load balancing and edge applications off of the primary server, to a new origin server. This server will have 5 edge-origin servers connecting to it, and each of those will have 5 edge servers connecting to them.

    This all looks possible, except the part when we start up edge servers. If I'm understanding correctly, we need to specify the edge-origin server to connect to in the loadbalancertargets.txt file. But if we're starting the edge-origin servers up for a temporary time, the addresses will change often, and we'll have to customize the startup package for the edge servers for each edge-origin.

    Should I be using only one load balancer server, or do I need a load balancer server on each edge-origin machine? If I'm telling them all to use my main origin server for the load balancer, will they be able to connect to all the streams?

    Is this correct, or is there an easier way to do all of this?

    Thanks for the help.

  2. #2

    Default

    Hi. You're asking how to configure a load-balancer in a Liverepeater origin>edge-origin>edge configuration, correct? I think you're on the right track. Lets see about your questions:
    1. Should I be using only one load balancer server?
    2. ...will clients be able to connect to all the streams?
    3. We'll have to customize the startup package for the edge servers for each edge-origin.

    The key to understanding here is knowing that the concept of the loadbalancer is independent from the concept of the LiveRepeater (edge-origin configuration).

    Regarding best practices for dynamic IP address: Short answer: don't do that. Long answer: Dynamic IP addresses are not conducive to the server paradigm, so you have to make a workaround. For some use cases you can use domain names and set a short TTL on your registrar when changing the A-Record to point to your new servers. Or, you could include a script in these edge-origin and edge server startup packages that checks a webservice on your main server to get the info needed to automatically configure themselves. Then you don't have to alter the startup packages. Otherwise, isn't AWS Elastic IP used to keep the same IP across different server instantiations?

    #1: Yes, you will use one loadbalancer server (listener). This is the server that your domain name points to; the domain name you want customers to use for your service.
    -It is possible to have nested loadbalancer listeners, for example if you need to use GeoLocation to keep certain clients in certain geographically located groups of edge servers.
    #2: Yes, if that is your goal. Clients can connect to whatever origin or edge-origin streams you've referenced in your edge application.
    #3: That's correct. When you start a new edge application, you have to tell it what origin server to connect to.

    To recap: Your loadbalancer senders point to your single loadbalancer listener. Your edge applications point to their group's edge-origin applications. Your edge-origin applications point to your main origin server.
    Last edited by randall; 09-11-2012 at 11:19 PM. Reason: clarification of StreamTypes

  3. #3

    Default

    I forgot to respond to this, but thank you for your help.

    We have a nice system set up where we scale up to:
    1 root "ingest" server that takes the streams.
    1 primary origin server that handles the initial load balancing requests and takes the streams from the root server.
    5 edge-origin servers that act as middlemen to the edges and have their own load balancer.
    25 edge servers, 5 for each edge-origin.

    When we don't have a lot of streams going, we go down to one of each.

    Thanks again.

  4. #4

    Default

    Minor correction on that: Each edge-origin server does not have its own load balancer. They don't even talk to the load balancer at all. Each edge connects to the primary origin server that does load balancing, but gets the video feed from the edge-origin.

  5. #5
    Join Date
    Jan 2013
    Posts
    10

    Default

    Hi Moresheth,

    thanks for your explanation. Are your servers phisical or virtual? We are planning to have a similar architecture on cloud servers (Rackspace), but we have to figure out how to instantiate and configure new edge servers on demand, in such complex architecture (origin -> edge/origin -> edge -> clients). Our goal is to scale dinamically, as the number of incoming client connections increases.

    Thank you.

  6. #6
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    I suppose you have considered the Wowza Dynamic Load Balancer, but will post a link in this thread in any case:
    http://www.wowza.com/forums/content....alancing-AddOn

    The Load Balancer Listener's HTTPProvider, "serverInfoXML", provides connection count for each edge in the cluster. You could build a system to scale your edge cluster around this.

    Richard

  7. #7
    Join Date
    Jan 2013
    Posts
    10

    Default

    Yes I know it.

    My concern (among others) is on how to instantiate and configure new cloud servers dinamically on Rackspace. If I have a origin cloud server (we can suppose it is also the listener in the load balancing) just instantiated in order to ingest a live stream, how can I instantiate new edge cloud servers and configure them to "see" the origin? I know I can prepare vm images with Wowza already configured and tuned, but some parameters (like the vm IPs) are known only when the servers are instantiated.

    Thanks Richard.

  8. #8
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    I'm not sure how Rackspace cloud servers can be started, but EC2 servers can be started manually through an web interface (AWS Console) or the EC2Tools API, and I would suppose there is an equivalent to both in Rackspace. And they must have a way of image a server, an image with Wowza installed and configured as an edge and Load Balancer sender, with .stream files in place, etc, such that when it starts up the LB Sender starts sending to the LB Listener, which will then start referring client requets to it. A new instance in this scenario will get new connections first because it will be the least loaded edge.

    Richard

  9. Default

    Seems to me you'd have two options here:

    1. Via configuration: Setting the origin hostname in your Application.xml as soon as you have the origin IP available.

    2. Via code. Since there's no built-in way for your server instances to "see" each other as they are turned up, you'll need to build out your own modules for this. One option would be to set up a socket service (outside of wowza) that would allow you to relay messages between instances as they are turned up and down. Another option would be to use a key-value store with pub/sub functionality (such as Redis), and then have each of your servers subscribe to the messages on the store, and publish a message as they turn up.

Similar Threads

  1. Understanding edge/origin setup and load balancing question.
    By fly135 in forum Server Administration
    Replies: 6
    Last Post: 12-16-2014, 11:37 AM
  2. Add Load Balancing Edge-Origin Configuration?
    By mmangold@oakland.edu in forum Server Administration Discussion
    Replies: 2
    Last Post: 07-21-2014, 09:03 AM
  3. Replies: 0
    Last Post: 02-22-2013, 02:42 AM
  4. NGRP on origin/edge + load balancing with dynamic stream names
    By confusedUser in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 01-06-2012, 12:59 PM
  5. Transcoder add-on and load balancing/origin/edge
    By dmahoney in forum AddOn: Transcoder
    Replies: 2
    Last Post: 01-05-2012, 02:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •