Computer-based switch for testing network servers

A computer-based switch enables automated testing of the fail-over and load-balancing operations of a cluster of network servers. The computer-based switch includes a control component, a switching component, and a plurality of network adapters each for forming a connection with a network server. The switching component directs network communication data received from clients on an external network to the network servers through the network adapters. The network adapters are selectively disabled and re-enabled by the control component to create connection failure and recovery conditions. The switching component is also programmable to operate on the network communication data passing therethrough to create other test conditions such as communication delay, data loss, data reordering, and data corruption. The switching component also allows communication flows from the individual network servers to the clients to be monitored for determining whether load balancing of the servers is properly performed.

TECHNICAL FIELD OF THE INVENTION

This invention relates generally to computer networks, and more particularly to the testing of network servers for operations such as fail-over and load balancing.

BACKGROUND OF THE INVENTION

In many network communication applications, multiple network servers are operated in parallel to increase the amount of network communication traffic the system can handle. For instance, it is common for a site on the World-Wide Web on the Internet to employ a cluster of network servers to ensure that its web pages can be browsed by a large number of computers on the Internet at the same time.

In a system employing a cluster of network servers, an incoming communication packet received from the network is typically passed through a hardware switch, which directs the packet to all of the servers in the cluster. The servers are connected by a private network, over which the servers communicate and assign responsibility for each new request that comes in over the hardware switch. The communications among the servers allow them to cooperate to handle fail-over and load balancing operations. In one scenario, “fail-over” means that when the physical connection between the switch and a server fails, the connection failure is detected by the server, and its work is taken up by the other servers with good connections. “Load-balancing,” on the other hand, means that when a server is already busy, further communication packets that originally would be handled by that server will be handled by the other servers that are available.

In order to ensure that the fail-over and load-balancing mechanisms are properly implemented in the network servers, the provider of the server software has to put the servers under test conditions and monitor the behavior of the servers. For instance, to test the fail-over mechanism, the server software provider has to create connection failure conditions and observe whether the servers can detect a failed connection and cause communication packets to be handled by other servers with good connections. Such tests, however, have been difficult to perform using existing network switches. Conventional network switches, which are hardware-based, do not lend themselves to flexible, automated, server testing. In order to generate connection failure conditions for testing the fail-over operation, the tester has to physically disconnect and reconnect the cables connecting the network switch and the servers being tested. Such manual operation is not only tedious and time consuming but also prone to errors. Moreover, it is also difficult to monitor communications passing through a conventional hardware-based network switch for the purpose of determining whether the servers have achieved effective load balancing.

SUMMARY OF THE INVENTION

In view of the foregoing, the present invention provides a computer-based network switch that is especially useful for testing network servers. The computer-based switch not only enables automated testing of the fail-over function of the network servers by providing program-controlled creation of connection failure conditions, but also allows network communication streams from the servers through the switch to an external network to be conveniently monitored for testing the load-balancing function. The computer-based switch includes a test control component, a switching component, a first network adaptor for connecting to an external network, and a plurality of second network adapters each for forming a connection with a network server and functions as a port to that server. The switching component directs network communication data it receives from the external network through the first network adapter to the second network adapters for transmission to the network servers. The second network adapters may be selectively disabled and enabled by the control component to create failure and recovery conditions of the connections between the second network adapters and the respective network servers. Network communication problems other than the failure of the physical connections, such as delay, data loss, data corruption, and data reordering, etc., can also be simulated by the switching component on the communication data passing through it. Moreover, the network traffic from the servers to the external network indicates the respective workloads of the servers. Thus, the switching component can be used to monitor communication data flows from the network servers to the external network to determine whether load-balancing mechanism is functioning properly.

Additional features and advantages of the invention will be made apparent from the following detailed description of illustrative embodiments, which proceeds with reference to the accompanying figures.

DETAILED DESCRIPTION OF THE INVENTION

The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.

The following description begins with a description, with reference toFIG. 1, of a general-purpose computing device that may form the building block for the computer systems and networks in which the present invention may be implemented. The present invention is described in detail with reference toFIG. 2. Turning now toFIG. 1, an exemplary general-purpose computing device in the form of a conventional personal computer20includes a processing unit21, a system memory22, and a system bus23that couples various system components including the system memory to the processing unit21. The system bus23may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory includes read only memory (ROM)24and random access memory (RAM)25. A basic input/output system (BIOS)26, containing the basic routines that help to transfer information between elements within the personal computer20, such as during start-up, is stored in ROM24. The personal computer20further includes a hard disk drive27for reading from and writing to a hard disk60, a magnetic disk drive28for reading from or writing to a removable magnetic disk29, and an optical disk drive30for reading from or writing to a removable optical disk31such as a CD ROM or other optical media.

The hard disk drive27, magnetic disk drive28, and optical disk drive30are connected to the system bus23by a hard disk drive interface32, a magnetic disk drive interface33, and an optical disk drive interface34, respectively. The drives and their associated computer-readable media provide nonvolatile storage of computer readable instructions, data structures, program modules and other data for the personal computer20. Although the exemplary environment described herein employs a hard disk60, a removable magnetic disk29, and a removable optical disk31, it will be appreciated by those skilled in the art that other types of computer readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memories, read only memories, and the like may also be used in the exemplary operating environment.

Referring now toFIG. 2, the present invention is directed to a computer-based network switch72that enables automated creation of connection failure conditions and simulation of other communication problems and allows communication data flows passing therethrough to be conveniently monitored. As will be described in greater detail below, the computer-based network switch72is especially useful for testing the fail-over and load-balancing operations of network servers that communicate with an external network100through the computer-based network switch. It will be appreciated, however, that such a computer-based network switch may be employed in computer network systems for other purposes and functionality.

Specifically, the computer-based network switch72in accordance with the invention includes a switching component80, a test control component82, a network adaptor102for connecting the switch to the external network100, and a plurality of network adapters74-78each of which may be connected to a network server and may be viewed as a port for network communication with that network server. The term “network adapter” as used herein means a device having its hardware and software driver components that is used to interface a computer with a network for transmitting and receiving network communication data on the network. Network adapters are typically in the form of computer plug-in boards that are commonly referred to as network interface cards (NICs), with their associated drivers. In the embodiment shown inFIG. 2, for convenience of illustration, only three network adapters74,76,78for connecting to network servers84-88are shown, and it will be appreciated that more or fewer network adapters may be employed in the computer-based switch72.

The switching component80directs incoming communication data received from the network100through the network adapter102to the servers84-88through the network adapters connected to the respective servers. In the illustrated embodiment, the communication data are in the form of communication packets90formatted according to a pre-selected network communication protocol. As will be described in greater detail below, the switching components may also be used to simulate communication problems other than a physical connection failure, such as, for example, transmission delay and packet loss, data corruption, and data reordering. Moreover, the use of the software-based switching component80allows communication data flows from the individual servers to the external network100to be monitored, thereby facilitating the testing of the load-balancing function of the servers.

In the embodiment illustrated inFIG. 2, the computer-based switch72is used in the context of testing the fail-over and load-balancing functions of the servers84-88. The testing setup includes client computers92-96on the external network100, which may be, for example, the Internet, a corporate intranet, or any suitable computer network. The incoming communication data received by the network adapter102are sent to the switching component80, which then sends the communication data to the network adapters74-78and on to the servers84-88. In the reverse direction, network traffic from the servers84-88to the external network100goes through their respective network adapters74-78to the switching component80, which sends the traffic through the network adapter102to the external network100.

As shown inFIG. 2, the network servers84-88are also interconnected by a private network114. Communications among the servers over the private network114allow the servers to coordinate among themselves for handing the incoming network communication requests, including performing fail-over and load-balancing operations.

As will be described in greater detail below, by using the computer-based switch72, the fail-over and load balancing operations of the network servers can be effectively tested. The operation of the switch72in such testing is controlled by the test control82. The overall control of the server testing is provided by a server-testing controller110, which may reside on the same host computer104with the computer-based switch72, or on a separate computer and preferably is also on the network100as illustrated. In the latter case, another network adaptor108is provided to allow the test control82to communicate with the server-testing controller110to receive commands regarding the server testing and to report testing statistics. The server-testing controller110coordinates the server testing by instructing the client computers92-96on the network100to send communication packets90to the servers via the computer-based switch72, and instructing the test control82to create test conditions and monitoring the responses of the drivers.

In accordance with a feature of the invention, the computer-based switch72can be used to create the failure of a physical connection to a selected server, such as the connection112to the server84. The connection failure condition is created by disabling the network adapter74that is connected to that selected server. After the network adapter74is disabled, the incoming communication packets that normally would be handled by the server84can no longer pass through the network adaptor74. The response of the servers84-88to this connection failure may then be observed to determine whether the fail-over mechanism works as designed.

Besides creating physical connection failure conditions as described above, the computer-based switch72may also be used to create other test conditions for testing the servers' responses to various communication problems. For instance, the switching component80may be instructed by the test control82to simulate communication delay by holding received communication packets from a given client in a buffer116for a pre-selected delay period before sending them to the target server. The switching component80may also be used to simulate packet loss by dropping communication packets destined to a selected server by a given percentage. Moreover, the switching component may be used to selectively introduce errors into the received communication packets, thereby creating data corruption situations. As a further example, the switching component80may be used to alter the order of data in a communication stream by using the buffer116to temporarily hold some data in the stream before forwarding them to the servers, thereby rearranging the order of data received by the servers. It will be appreciated the capability of simulating various communication problems other than physical connection failures provides significantly improved flexibility in testing network servers that is not available with conventional hardware-based network switches.

As mentioned above, another significant advantage of using the computer-based network switch72is that it allows the load-balancing function to be tested, which is difficult to do with conventional hardware-based switches. The testing of the load-balancing operation involves monitoring the amount of network traffic flowing from each server to the external network. The monitored network traffic from a server is a good indicator of the workload of that server. With the computer-based network switch72, the network traffic from the servers84-88can be conveniently monitored. This is because the outgoing network traffic from the servers all goes through the switching component80, which forwards the traffic through the network adapter102to the external network. The effectiveness of the load balancing operation of the servers can be determined by comparing the amounts of network traffic from the respective servers to see whether they are generally evenly distributed.