INFO: How Failover Works Between Microsoft TV Advanced Client and Microsoft TV Server (318350)



The information in this article applies to:

  • Microsoft TV Advanced 1.5

This article was previously published under Q318350

SUMMARY

Failover is a mechanism that permits a Microsoft TV Advanced Client set-top box (STB) to receive services from a different Microsoft TV Server (or servers) if the primary server is not available. Microsoft TV Server provides failover as part of the interaction between Microsoft TV Client and Microsoft TV Server.

MORE INFORMATION

When a user logs on to Microsoft TV Server, the client STB receives a list of all of the services (such as wtv-nt-mail, wtv-nt-home, and wtv-nt-favorites) that are available from Microsoft TV Server.
  • Each service listing includes the IP addresses of computers that provide the service.

    The list is based on configuration file sections that define computers in the ConfigGroup for the each service (for example, the RunsMailApp group that identifies computers that run the wtv-nt-mail service).

    In Microsoft TV Server, the default configuration file to define these IP addresses and services is Siteconfig.cfg. However, it is a common practice to extract the site specific values into a separate configuration file.
  • On the list, the number of computers for each service is determined by the Handout parameter for the corresponding WtvService entry in the configuration file. The default value for the WtvService Handout parameter is 2.

    In Microsoft TV Server, TVSConfigSchema.xml is a configuration file that is used to set the value. For example:
    <SubModule name="WtvServiceList" required="false" max="*" createNames="false">
                <SubModule name="WtvService" required="false" max="*" createNames="false">
    
    <Option name="Handout" required="true" max="1" createNames="false">
                        <Description>
                            Number of addresses to hand out
                        </Description>
                        <Datatype>
                            <Integer>
                                <Min>
                                    1
                                </Min>
                                <Max>
                                    16
                                </Max>
                            </Integer>
                        </Datatype>
                        <Default>
                            2
                        </Default>
                    </Option>
    					
  • You can assign a lower number to the Handout parameter; if you do this, the number of computers that you specify (for example, 1) appear on the service list.
The client STB tries to make a service request to the first computer on the list. If a connection is refused or the client experiences a wait that is longer than the value of wtv-connection-timeout, the client closes the connection, and then opens a new connection to the next computer on the list.

The wtv-connection-timeout value is defined in the configuration file Sysconfig.cfg. The default value of wtv-connection-timeout is 60 seconds, as shown in the following example:
<Header name="wtv-connection-timeout">60</Header>
				
In the configuration file TVSConfigSchema.xml, WtvLogonApp typically randomizes the list of computers that is sent out for each service by using RandomizeAllServiceLists in WtvServiceLists for all services or by using RandomizeServiceList in WtvServiceList for a single service. For example:
    <Module name="WtvServiceLists">
        <Description>
            Lists of WTVP services to be handed out to clients at logon
        </Description>
        <Option name="RandomizeAllServiceLists" required="true" max="1" createNames="false">
            <Description>
                
	    Generate a random service list every time. If the option is false,
	    the service list generated will be in same order every time 
	    for all services in all service lists.
            
            </Description>
            <Datatype>
                <Boolean/>
            </Datatype>
            <Default>
                true
            </Default>
        </Option>
    </Module>

    <Application name="WtvLogonApp">
        <Description>
            The WebTV Logon app (HeadWaiter and Scriptless)
        </Description>
        <Option name="TicketMgrCLSID" required="true" max="1" createNames="false">
            <Description>
                COM Class Id of the ticket manager object.
            </Description>
            <Datatype>
                <GUID/>
            </Datatype>
            <Default>
                {E06836A6-331A-4f49-9264-2AB6CAE6A979}
            </Default>
        </Option>
        <Option name="TicketProfilesCLSID" required="true" max="1" createNames="false">
            <Description>
                COM Class Id of the ticket profiles object.
            </Description>
            <Datatype>
                <GUID/>
            </Datatype>
            <Default>
                {74E2CA72-31F1-492f-9726-0DF3D273BF1A}
            </Default>
        </Option>
        <UseModule name="WtvServiceLists" required="true" max="1" createNames="false"/>
    </Application>
				

Case Study

I.

If, after the STB makes the new connection, the connection is closed and the STB makes another service request, one of the following occurs:
  • If the request comes before the value of wtv-connection-timeout, the client contacts the computer to which the client was last connected.

    -or-
  • If the request comes after the value of wtv-connection-timeout, the client contacts the first computer on the list again.
    • If that computer is now available, the client connects to that computer.

      -or-
    • If that computer is not available, the client tries to connect to the next computer on the list as before.

II.

In some circumstances, a client does not failover. For example:
  • If a client tries to use an idle connection, and then discovers that the service has closed the connection, the client does not treat this as an error. Instead, the client opens a new connection back to the service because Internet Information Service (IIS) may be closing connections that appear to be unused.
  • If Microsoft TV Server sends a reply to the client that has an error (for example, Error 500), the client does not failover; instead, the client reports the error to the user of the STB.

    NOTE: Error 511 is an exception. This error causes the client to failover immediately.

Modification Type:MinorLast Reviewed:6/18/2003
Keywords:kbinfo KB318350