|
E-mail us with your comments and feedback about this article. |
This article describes how to use Windows Media Services to configure your Windows Media server as either an origin server or as a cache/proxy server to conserve bandwidth, decrease network-imposed latency, and offset the load on the origin server on your network.
|
|
David Nelson Microsoft Corporation September 2007
Applies to: Microsoft® Windows Media® Services 9 Series or later
Contents
IntroductionA cache/proxy server network conserves bandwidth, decreases network-imposed latency, and offsets the load on the origin server from which the content is published. Network bandwidth is minimized because only one connection from the origin server is required to upload content to and receive information from remote cache/proxy servers on the network. Latency is decreased because a client can receive content from a nearby cache/proxy server more quickly than it could if it had to traverse the network or the Internet to receive content from the origin server. Additionally, the load on the origin server is offset because fewer clients are connecting directly to it. These three factors result in a better viewing experience for users and operating cost reduction.
In the Windows Server 2003, Enterprise edition and Windows Server 2003, Datacenter edition operating systems, you can configure cache/proxy properties in Windows Media Services 9 Series to use your Windows Media server as an origin server that controls the behavior of remote cache/proxy servers during a streaming event. In the Windows Server 2008 operating system, you can configure a new, built-in WMS Cache/Proxy plug-in in Windows Media Services 2008 to use your Windows Media server either as a cache/proxy server or as a reverse proxy server so that it can provide caching and proxy support to other Windows Media servers.
Note
Back to Top
Caching and streaming on-demand contentThe WMS Cache Proxy plug-in in Windows Media Services allows the server (the cache/proxy server) to cache on-demand content from another Windows Media server (the origin server). When a client requests on-demand content, the plug-in verifies that the content is cached locally and is current. To do this, it checks the cache expiration property of the content. If the content is set to expire at a time that has already passed, the plug-in requests that the cache/proxy server open a connection to the origin server and verifies that the content in the cache matches the content on the origin server. A cache hit occurs if the content matches; a cache miss occurs if the content does not match. If the origin server is unavailable or cannot provide the requested content, the cache/proxy server returns an error message to the client stating that the content cannot be found.
If a cache hit occurs, the plug-in requests that the cache/proxy server stream the content from its cache to the client.

If a cache miss occurs, the content is purged from the cache, and the cache/proxy server downloads updated content from the origin server. The cache/proxy server then initiates another connection to the origin server to act as a proxy server to deliver the content to the client.

NotesIf a cache miss occurs when the cache/proxy server tries to stream multiple-bit-rate (MBR) content, the cache/proxy server will try to download all of the different bit rate streams from the origin server simultaneously. If you have set a bandwidth limit for outgoing distribution streams on the origin server or a limit on the incoming bandwidth for the cache/proxy server, the aggregate bandwidth of the multiple-bit-rate stream may exceed these limits. If so, the cache/proxy server cannot download the content to its cache and will only stream the content at the bandwidth requested by the client. If content was moved to a different location on the origin server, the cache/proxy plug-in can transfer client requests to the new location. For example, if the cache/proxy plug-in receives an HTTP code 301 or 302 when checking whether content is current, the plug-in updates its internal database to recognize requests for the new location.
Back to Top
Proxying a live streamThe WMS Cache Proxy plug-in in Windows Media Services allows the cache/proxy server to proxy a live stream from an origin server through another Windows Media server. When a client requests a live stream, the plug-in checks whether the cache/proxy server is already proxying the stream. If the server is not proxying the stream, the plug-in requests that the cache/proxy server open a connection to the origin server. After establishing a connection to the origin server, the cache/proxy server streams the content from the origin server to the client. If the cache/proxy server is already proxying the stream, the plug-in requests that the server split the stream so that all requesting clients can receive the content. In this way, there is only one connection between the cache/proxy server and the origin server. The content is not cached because a live stream does not have a file associated with it.

Back to Top
About reverse proxyThe WMS Cache Proxy plug-in in Windows Media Services allows the cache/proxy server to function as a reverse proxy server, which is a proxy server that is configured to be responsible for servicing all client requests. For a unicast broadcast, a reverse proxy server reduces the load on the origin server by streaming multiple unicast streams while receiving only one stream from the origin server. For on-demand content, a reverse proxy server reduces the load on the origin server by caching the content from the origin server and streaming it to clients from its cache.
To the client, the reverse proxy server appears to be the origin server. This enables you to isolate the origin server from clients. A reverse proxy server increases the security of your streaming media system because the client never connects to the origin server directly.

Authentication for reverse proxy servers differs from that of conventional cache/proxy servers. When the client submits a request for content and authentication is enabled, the content must first be authenticated by the reverse proxy server. After the client is authenticated, the reverse proxy server submits a content request to the origin server and must be authenticated by the origin server before it can begin proxying the content to the client.

To set authentication credentials for a reverse proxy server, do the following:On the reverse proxy server, run the following script. In this script, password is the password and user_name is the user name you want to use to authenticate the origin server: Dim server Set server = CreateObject("WMSserver.Server") Dim pp1 Set pp1 = server.PublishingPoints.Item("Cache/Proxy Broadcast") pp1.DistributionPassword = "password" pp1.DistributionUserName = "user_name"
On the origin server, configure the appropriate authentication plug-in to accept these values. For more information, see "Authentication category" in Windows Media Services Help.
NotesA large number of unicast streams can place an enormous burden on the origin server. You can increase the reliability of your streaming media system by caching and delivering content from multiple reverse proxy servers. If only one reverse proxy server is used, there is the potential for a single point of failure in that system. By using more than one reverse proxy server, you can reduce the chance that the system will fail due to a reverse proxy server fault.
Back to Top
Configuring cache/proxy plug-ins and propertiesWindows Media Services includes plug-ins and properties that enable cache and proxy server support. You can use a Windows Media Server as a cache/proxy server or you can use a Windows Media Server as an origin server that controls the behavior of the remote cache/proxy servers during the streaming event.
If you choose to use the Windows Media server as a cache/proxy server on the network, you can configure Cache/Proxy Management plug-ins to configure the Windows Media server as either a cache/proxy server or a reverse proxy server for caching and proxying on-demand or live content. The WMS Cache Proxy plug-in is included in Windows Media Services for this purpose.
You can also choose to use the Windows Media server as an origin server on the network and configure properties to specify how long content streamed from on-demand or broadcast publishing points on the origin server to remote cache/proxy servers is valid before it must be refreshed. Cache/Proxy properties are used to specify the frequency with which remote cache/proxy server check for updated on-demand or broadcast content on the origin server.
This section contains the following topics:
Configuring a Windows Media Server as a cache/proxy serverThe WMS Cache Proxy plug-in in Windows Media Services is used to configure a Windows Media server either as a cache/proxy server or as a reverse proxy server so that it can provide caching and proxy support to other Windows Media servers. This section describes how to enable and configure the plug-in.
This section contains the following topics: NotesWhen you configure the Windows Media server as a cache/proxy server by enabling and configuring the WMS Cache Proxy plug-in, default publishing points named Cache/Proxy On-Demand (for caching and streaming on-demand content from the origin server) and Cache/Proxy Broadcast (for proxying live content from the origin server) are created in Windows Media Services. These default publishing points allow you to monitor and configure additional properties for managing your Windows Media server as a cache/proxy server. For more information, see "About the Monitor tab for a publishing point" and About the Properties tab for a publishing point" topics in Windows Media Services Help. Ports must be opened in the firewall on this server so that it can update content in its cache using a protocol that you select. For more information, see Firewall Information for Windows Media Services. In addition, on the origin server, the appropriate server control protocols must be enabled. For more information, see "Selecting data transfer protocols" in Windows Media Services Help.
Enabling and configuring the WMS Cache Proxy plug-inThis section provides the following procedures for enabling and disabling the WMS Cache Proxy plug-in in Windows Media Services and for configuring properties for the plug-in on the cache/proxy server: To enable the plug-inIn Windows Media Services, click the server for which you want to enable the plug-in. In the details pane, click the Properties tab. In Category, click the Cache/Proxy Management category. In Plug-in, click WMS Cache/Proxy, and then click Enable.
To configure the plug-in propertiesClick the server for which you want to configure the plug-in properties. In the details pane, click the Properties tab. In Category, click the Cache/Proxy Management category. In Plug-in, click WMS Cache/Proxy, and then click Properties. Configure the plug-in properties described in the following sections.
To disable the plug-inIn Windows Media Services, click the server for which you want to disable the plug-in. In the details pane, click the Properties tab. In Category, click the Cache/Proxy Management category. In Plug-in, click WMS Cache/Proxy, and then click Disable.
WMS Cache Proxy - General propertiesThe WMS Cache Proxy plug-in is used to configure this Windows Media server either as a cache/proxy server or as a reverse proxy server so that it can provide caching and proxy support to other Windows Media servers. You can configure the following options on the General tab for this plug-in.

| Item | Description |
|---|
Cache/Proxy Plug-in Status
| Check the status box to determine the following: | Preferred Plug-in Protocol
| Select a protocol to be used by this server when it updates content in its cache by streaming it from the origin server:Client Protocol (default). Stream the content to the cache using the same streaming protocol that is requested by the client. HTTP. Stream the content to the cache using Hypertext Transfer Protocol (HTTP). RTSPU. Stream the content to the cache using Real Time Streaming Protocol (RTSP) in combination with the User Datagram Protocol (UDP) networking protocol. RTSPT. Stream the content to the cache using RTSP in combination with the Transmission Control Protocol (TCP) networking protocol.
|
WMS Cache Proxy - Cache propertiesYou can configure the following options on the Cache tab for this plug-in.

| Item | Description |
|---|
Enable Caching
| Select this option to enable this server to cache content by streaming it from the origin server, if it must do so to fulfill a client request.
| Cache Settings
| Use the settings in this area to specify the following cache directory properties:Limit Disk Quota (MB). Select this option and specify the amount of disk space available in the cache directory for storing cached content. If you specify a storage capacity for the cache directory, when the quota is reached, cached content will be deleted from the cache directory, beginning with the oldest item that has not been delivered to clients. If you do not specify a storage capacity for the cache directory and when there is insufficient disk space available for storing additional cached content, cached content will be deleted from the cache directory, beginning with the oldest item that has not been delivered to clients. Cached content actively being streamed by clients is marked for deletion and is deleted when the last user session ends. If another client requests cached content marked for deletion, this server will cache another copy of the content from the origin server to fulfill the request. Limit Archive Quota per Stream (KB). Select this option to specify the amount of disk space available in the cache directory for storing any single on-demand file that is created from a live stream by the Play While Archiving feature. Enable Freshness Check. Select this option to allow this server to check the cache expiration property of cached content when it is requested by clients. If the content is set to expire at a time that has passed, this plug-in opens a connection to the origin server to verify that the cached content is still current by comparing it to the content on the origin server. A cache hit occurs if the cached content matches; a cache miss occurs if the cached content does not match. If the origin server is unavailable or cannot provide the requested content, this server returns an error message to the client stating that the content cannot be found. Enable Play While Archiving. Select this option to allow this server to start streaming content requested by clients without waiting until the content from the origin server is completely cached. A partially-cached file can be used as an on-demand source 60 seconds after caching starts. Cache Directory Path. Select this option to specify the location on this server where cached content is stored. The default value is %systemdrive%\WMSCache.
| Caching Speed
| Select one of the following options that specify the speed at which this server caches content from the origin server, if it must do so to fulfill a client request.Maximum Available Bandwidth. Choose this option to cache content from the origin server as fast as the network will allow. Content Bit Rate. Choose this option to cache content from the origin server at the same bit rate as the requested content bit rate. Note that for multiple-bit-rate content, the caching speed is the same as the average bit rate of the content. Kbps. Enter a value in this box to specify the bit rate at which this server caches content from the origin server.
| Disk Usage
| Use this information in this area to view how much of the disk quota in the cache directory is used by cached content and how much remains available for caching content. You can also click Clear Cache to empty the cache directory of all cached content.
Cached content actively being streamed by clients is marked for deletion and is deleted when the last user session ends. If another client requests cached content marked for deletion, this server will cache another copy of the content from the origin server to fulfill the request.
|
WMS Cache Proxy - Proxy propertiesYou can configure the following options on the Proxy tab for this plug-in.

| Item | Description |
|---|
Proxy
| Select this option so that this server functions as a cache/proxy server for the origin server. To the client, the proxy appears to be the origin server.
| Proxy Redirect
| Select this option to redirect a client request to another server in an array of cache/proxy servers, and then type the name of the alternate server in the Alternate Proxy box.
You can use proxy redirection to balance loads, connect the client to a closer proxy, or send the client to content that has already been cached.
| Reverse Proxy
| Select this option so that this server functions as a reverse proxy server, and then, in the Content Server box, type the name of the publishing point on the server to which you want to forward the client request for content (for example, origin_server/publishing_point).
A reverse proxy server dedicates any incoming client request to a specific server and can be used for load balancing on a server farm.
|
WMS Cache Proxy - Prestuff propertiesYou can configure the following options on the Prestuff tab for this plug-in.

| Item | Description |
|---|
Prestuff from Stream
| Select this option to enable this server to cache content by streaming it from the origin server, even when it is not requested by clients.
Type the URL of the file on the origin server in the URL box (for example, http://server/publishing_point/file), and then select one of the following Prestuff Rate options that specify the speed at which this server caches content from the origin server:Maximum Available Bandwidth. Choose this option to cache content from the origin server as fast as the network will allow. Content Bit Rate. Choose this option to cache content from the origin server at the same bit rate as the requested content bit rate. Note that for MBR content, the caching speed is the same as the average bit rate of the content. Kbps. Enter a value in this box to specify the bit rate at which this server caches content from the origin server.
| Prestuff from File
| Select this option to enable this server to make a file on an available file storage system, such as a local file system, storage area network (SAN), or network-attached storage (NAS), available for streaming to clients.
To copy the file from file storage to the cache directory on this server and make it available to clients before it is requested, do the following:Type the UNC path of the file in the Content Path box (for example, \\server\folder\file or network_share\file). Type the URL that clients must use to stream the file in the Stream URL box (for example, rtsp://server/publishing_point/file or http://server/publishing_point/file). Select the Copy content to local cache directory check box. To copy the file from file storage to the cache directory on this server only after a client requests it, do the following:Type the UNC path of the file in the Content Path box. Type the URL that clients must use to stream the file in the Stream URL box. Make sure that the Copy content to local cache directory check box is not selected. Note that this server cannot use freshness checking to determine whether the file in the file storage system has been updated. It the file has been updated, you must click Prestuff to cache the updated file to the cache directory.
| Prestuff
| Click this button to start caching the specified content from the origin server, even when it is not requested by clients.
|
WMS Cache Proxy - Query propertiesYou can configure the following options on the Query tab for this plug-in.

| Item | Description |
|---|
Query Entries Containing
| Search for files in the cache directory on this server by entering the streaming URL of a file (for example, rtsp://cache_directory/file), and then click Query to display the file in the results list. To display multiple files in the results list, you can use the asterisk (*) wildcard character instead of the path or the file name or enter a partial URL (for example, enter rtsp to display all files that include the RTSP URL moniker or enter clip to display all files that include "clip" in the file name).
| Delete
| Select a file in the results list, and then click this button to delete the file from the cache directory on the cache/proxy server.
Cached content actively being streamed by clients is marked for deletion and is deleted when the last user session ends. If another client requests cached content marked for deletion, this server will cache another copy of the content from the origin server to fulfill the request.
|
Configuring a Windows Media server as an origin serverProperties in Windows Media Services are used to control the behavior of remote cache/proxy servers from the origin server during a streaming event. This section describes how to configure two categories of properties on the origin server so that you can control how content is streamed from on-demand or broadcast publishing points on the origin server to remote cache/proxy servers on the network.
This section contains the following topics:
Configuring Cache/Proxy propertiesThis section provides the following procedure for configuring cache/proxy properties when you use your Windows Media server as an origin server in a cache/proxy system:
To configure Cache/Proxy propertiesClick the publishing point on the origin server for which you want to configure cache/proxy properties. If you streaming on-demand content from the origin server, click the on-demand publishing point. If you are proxying live content from the origin server, click the broadcast publishing point. In the details pane, click the Properties tab. In Category, click the Cache/Proxy category. In Property, click Cache expiration (on-demand) or Stream splitting expiration (broadcast), and then click Properties. Configure the properties described in the following sections.
Configuring Cache expiration properties (on-demand)You can configure the following options on the General tab for this property to determine the length of time that content streamed from on-demand publishing points on the origin server to remote cache/proxy servers is valid.

| Item | Description |
|---|
After (seconds)
| Select this option to have the remote cache/proxy server check this server for updated content after a specified number of seconds has passed. The default setting is 86,400 seconds (24 hours). If the content on this server is newer than the content on the cache/proxy server, the cache/proxy server will update its content.
| Immediately
| Select this option to have the remote cache/proxy server update its content from this server each time a client requests the content from the cache/proxy server.
| Never
| Select this option to have the remote cache/proxy server never update the content from this server. To update the content, the cache/proxy server administrator must request a new version of the content.
|
Note- You must ensure that the Enable caching by cache/proxy servers property for the on-demand publishing point is enabled to allow a cache/proxy server to cache the content locally and stream the content to clients from the cache rather than from the origin server. To enable this property, do the following:
Click the on-demand publishing point on the origin server for which you want to enable this property. In the details pane, click the Properties tab. In Category, click the General category. In Property, click Enable caching by cache/proxy servers, and then click Enable.
Configuring Stream splitting expiration properties (broadcast)You can configure the following options on the General tab for this property to determine the length of time that content streamed from broadcast publishing points on the origin server to remote cache/proxy servers is valid. Note that remote cache/proxy servers in this configuration are sometimes called stream-splitting servers.

| Item | Description |
|---|
After (seconds)
| Select this option to have the remote cache/proxy server check this server for updated content after a specified number of seconds has passed. The default setting is 86,400 seconds (24 hours). If the content on this server is newer than the content on the cache/proxy server, the cache/proxy server will update its content.
| Immediately
| Select this option to have the remote cache/proxy server update its content from this server each time a client requests the content from the cache/proxy server.
| Never
| Select this option to have the remote cache/proxy server never update the content from this server. To update the content, the cache/proxy server administrator must request a new version of the content.
|
Available to broadcast publishing points only. Enable this property to allow a cache/proxy server to distribute the broadcast stream to multiple clients from the cache rather than from the origin server.
Note- You must ensure that the Enable stream splitting property for the broadcast publishing point is enabled to allow a cache/proxy server to distribute the broadcast stream to multiple clients from the cache rather than from the origin server. To enable this property, do the following:
Click the broadcast publishing point on the origin server for which you want to enable this property. In the details pane, click the Properties tab. In Category, click the General category. In Property, click Enable stream splitting, and then click Enable.
Back to Top
|