Solutions - Literature
 

CENTRAL DISPATCH AND STREAMING MEDIA

INTRODUCTION

This document describes how Resonate Central Dispatch handles streaming media formats. Central Dispatch can load balance streaming media when the initial client-to-server connection is via TCP. RealNetworks software works in just this way and has been tested with Central Dispatch. Integration testing was conducted with Resonate Central Dispatch and RealNetworks RealServer version 5.01. Testing was performed on a two-node Central Dispatch site which consisted of a Solaris server and an NT server.

Key Benefits of Central Dispatch and Streaming Media

  • High availability for streaming media services
  • Optimized server resource utilization
  • Fastest client performance

How RealNetworks Streaming Server Works

Real Network Streaming Server Diagram
  1. Client downloads web page that has a link to an audio/video stream.
  2. Web browser makes request for this "page" to the web server.
  3. The web server returns a ".rm" (RAM) file to the web client. This file contains information about the streaming server that the client should connect to.
  4. The RAM file causes the web browser to launch the RealPlayer. The web browser passes the data in the RAM file to the RealPlayer.
  5. The RealPlayer makes a TCP-based connection to the RealServer, requesting the specified media "stream."
  6. The RealPlayer starts sending the UDP stream back to the RealPlayer. The RealPlayer keeps the TCP connection open and uses the open connection to communicate commands (speed up stream, slow down stream, fast forward, etc.) and status information back to the RealServer.

RealNetworks provides a basic load balancing mechanism to their customers today. This mechanism is implemented on the web server between the request and the delivery of the RAM file. RealNetworks has a CGI script that lives on the web server and runs when the client requests the RAM file. The CGI script builds the RAM file on the fly and returns it to the client. Since the CGI script knows about each of the available RealServers, it round-robins between them by returning a RAM file that points to each server in turn.

The advantages that Central Dispatch provides over this CGI script solution are:

  • Increased Load Balancing Control. Because Central Dispatch looks at the live status of each server, Central Dispatch is able to load balance traffic more effectively.
  • Unified Load Balancing. Central Dispatch provides load balancing for the web server and streaming servers (and other kinds of services), all under the same load balancing umbrella.
  • Simplified Server Administration. Often, the server administrator is not the same person who administers the web site content. With Central Dispatch, the server administrator can add more machines as needed without changing content (since all content points to a single virtual IP (VIP)address). With RealNetwork's basic CGI solution, the web content administrator would be required to change all CGI scripts to make them aware of the new server.

Streaming Media Data Flow

Streaming Media Data Flow Diagram

The diagram above shows a possible web site configuration which serves streaming media. The site consists of two web servers (Web1, Web2) and two streaming media servers (Stream1, Stream2). In an integrated Central Dispatch and RealServer environment, there are two data flow paths for the RealServer traffic. First, the client makes the TCP-based request to the RealServer. The request is actually directed to the VIP address of a Central Dispatch site. The Central Dispatch scheduler (Web1) accepts the request and, via the TCP Connection Hop, directs the request to the appropriate server (Stream2). The RealServer responds back to the client via TCP to fully establish the connection and receives all data. The RealServer then starts transmitting the UDP stream of data back to the client directly. This UDP stream is a one way transmission from server to client.

The client continues to see all TCP connections as originating from the VIP address. On the RealPlayer, the client can select the "View" menu and choose "Statistics." This will display a number of different counters displaying information on the current stream. Pressing "CTRL-SHIFT-F1" on this screen will expand the screen and display additional detailed information, including the URL of the stream that is being received. When connected to a Central Dispatch VIP, this displays the name of the VIP in the URL. It correctly displays the VIP address, and not the address of the individual server.

RealServer Configurations

The only changes that must be made to the RealServer configuration in order to work with Central Dispatch is to change the server's IP address binding so that the server will bind to all interfaces in the machine and not just the primary NIC. The binding is set in the server's configuration which can be found in $REALSERVER/server.cfg (where $REALSERVER is the installation directory for the RealServer software). To change the binding you must add the following line to the server.cfg file:

BindToAllInterfaces True

Once that line is added and the server is restarted, the RealServer will bind to all interfaces (and thus all IP addresses) that it sees on the system when it starts. Note: the loopback adapter and all necessary VIP addresses must be installed on the system prior to the start-up of the RealServer, otherwise the RealServer will not bind to the VIP address and will not respond to VIP traffic.

Central Dispatch Configurations

The only change that is required within Central Dispatch is to set up a scheduling rule under the "Telnet" tab that will handle the streaming traffic. By default, the RealNetworks RealServer listens on port 7070. It is possible to run the RealServer on a different port by changing the "PnaPort" line in the server.cfg file. However the RealPlayer will attempt to connect on the default port unless a different port is specified, so the Virtual Port number should be set to 7070. The follow line is an example of the raw scheduling rule from the test cluster (taken from the "agent-rules" config file):

TELNET|10.10.10.101|7070|7070|0|*|10.10.10.10.1|10.10.10.10.11

Protocol|VIP Address|Virtual Port|Server
port|placeholder|placeholder|Server|Server

NOTE: Even though the RealPlayer accepts URLs, you can not set up a scheduling rule for streaming traffic on the HTTP tab. If you do, the RealPlayer will be unable to connect to the server.

SUMMARY

Central Dispatch can be used to load balance and provide high availability for mirrored streaming media services that utilize TCP to make their initial connections. Scheduling streaming media with Central Dispatch provides high service availability, optimized server utilization, and the highest service level for end users. Central Dispatch has been tested with RealServer 5.01 running on Solaris and NT.

For more information on how Resonate can help you guarantee the end-user service levels of business-critical applications while cutting operating costs, contact a sales representative at or 408-545-5535.

Back to Literature

In order to view above documents, you need an Adobe Acrobat reader. In case you don't have it, you can download it free of charge from the Adobe website.

Get Adobe Reader