Best Practices for Streaming with Windows Media Services


For best results when streaming audio and video from Windows Media Services 9 Series, follow these guidelines.

Running Windows Media Services on a Separate Computer

Streaming audio and video in real time can require a lot of CPU resources. Sharing these resources with other services, such as IIS, can cause disruption in the smooth and constant streaming of data that is required for optimal performance, especially during high-traffic periods. Running the two services on the same server can also cause conflicts because both services attempt to bind to port 80 by default.

If you must run both services on the same server, you can avoid port conflicts either by assigning Windows Media Services to a different port or by creating separate IP addresses for each service, and then using port 80 on each IP address.

Assigning Windows Media Services to a different port is not advisable when you intend to stream using HTTP. While HTTP is not the most efficient protocol for streaming, it does enable you to stream through firewalls. Changing the default port to something other than 80 could prevent you from reaching clients through firewalls.

Creating separate IP addresses for each service is the preferred approach when you must run IIS and Windows Media Services on the same server. When a server has more than one IP address it is considered to be multi-homed. You can create a multi-homed server in two ways:

  • Assigning multiple IP addresses to a single network card

  • Assigning a single IP address to each network card that is installed in the server.

Once you’ve added the IP addresses, you must enable HTTP streaming for those addresses that are associated with Windows Media Services.

With IIS 6.0, HTTP requests are handled by the Http.sys listener utility. By default, Http.sys will monitor all requests coming in on port 80 for all IP addresses bound to the computer (except for the loopback address, 127.0.0.1). For Windows Media Services to bind to port 80 for streaming content, you must limit the Http.sys listener to specific IP addresses so that Windows Media Services can monitor the rest. Enabling the HTTP Server Control Protocol plug-in without configuring the Http.sys listener results in the error shown in figure 3.5.

click to expand
Figure 3.5: Error message indicating a port conflict on your server.

Follow these steps to configure the HTTP.sys listener:

  1. From a command prompt, type these commands to stop the relevant services:

    net stop wmserver net stop iisadmin/w3svc net stop http
  2. Run the WMSHttpSysCfg.exe utility (located at %systemroot%\system32
    \windowsmedia\server\admin\mmc\WMSHttpSysCfg.exe).

  3. Add the IP addresses that you want Http.sys to monitor. The addresses that Http.sys does not monitor will be used by Windows Media Services.

  4. Click OK to close the dialog box.

  5. At the command prompt, restart the services that you stopped in step 1 by running these commands.

    net start http net start iisadmin net start wmserver 

Now configure the WMS HTTP Server Control Protocol:

  1. Start the Windows Media Services MMC snap-in.

  2. Click the Properties tab.

  3. In Category, click Control protocol.

  4. In Plug-in, right-click WMS HTTP Server Control Protocol, and then click Disable (if it is not already disabled or if it is in an error state).

  5. In Plug-in, right-click WMS HTTP Control Protocol, and then click Properties.

  6. Click Allow selected IP addresses to use this protocol.

  7. Select the IP addresses that you want to use to deliver content over port 80.

    Note

    Do not select the same IP addresses that you added to the Http.sys listener in step 3, otherwise the plug-in might go into an error state when it is enabled.

  8. Click Use default port (80), and then click OK.

  9. Right-click WMS HTTP Server Control Protocol, and then click Enable.

Running Windows Media Encoder on a Separate Computer

Capturing and compressing content is a CPU-intensive process, and maintaining connections with clients during the streaming process is memory intensive. Performing both tasks on the same computer could overburden your server, especially when the content you are encoding is complex, or when your server is experiencing a lot of traffic. When the server is overburdened, frames or even clients might be dropped or clients might from the stream. For best results on both the encoding and streaming ends of the process, keep Windows Media Encoder and Windows Media Services on different computers.

Verifying that You Can Connect to the Server

Choose an audio or video clip that you have encoded (or choose one that is included with Windows Media Services, such as content_clip1.wmv), and attempt to connect to it. For example:

  • Can you connect to content_clip1.wmv from the local server?

  • Can you connect to content_clip1.wmv from a computer plugged into the same hub?

  • Can you connect to content_clip1.wmv from a computer on the same subnet?

  • Can you connect to content_clip1.wmv from a computer on a different subnet (different side of the router)?

  • Can you connect to content_clip1.wmv from a computer on the other side of the firewall?

Running Windows Media Load Simulator to Test Stability and Capacity

Windows Media Load Simulator is a tool that enables you to simulate client load on your Windows Media server. This is an effective way to test real-world scenarios without exposing your server to actual clients. You can use the information gleaned from the load tests to set limits on your server and alter the configuration of publishing points, authentication or authorization plug-ins, and so on.

Windows Media Load Simulator 9 Series is available from the Downloads page of the Windows Media 9 Series Web site and on the CD provided with this book.

Making Sure Affinity is Set if Using Network Load Balancing

When using a bank of load-balanced servers, there is no guarantee that a client will be directed to the same media server each time it connects. This could potentially cause packet resend requests, logging errors, or connection problems. To avoid these problems, set affinity on the Network Load Balancing service. Setting affinity ensures that over the course of a session, a connected client will always be connected to the same media server. See the Network Load Balancing online Help for more information.




Microsoft Windows Media Resource Kit
Microsoft Windows Media Resource Kit (Pro-Resource Kit)
ISBN: 0735618070
EAN: 2147483647
Year: 2005
Pages: 258

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net