1. Field of the Invention
The present invention relates generally to the data processing field, and more particularly, to a computer implemented method, system and computer program product for routing an application request in a data processing system having multiple machine clusters.
2. Description of the Related Art
A single application may be served by more than one machine cluster in a data processing system that includes multiple clusters of machines. If one of the plurality of machine clusters is unavailable or over-utilized, it is known to send a request for the application to another machine cluster that is available or that is being utilized to a lesser extent.
Currently, when it is desired to send a request for an application from a first machine cluster to a second machine cluster, the request is directed to the second cluster using the URI (Universal Resource Identifier) of the second cluster. If the application is not available at the second cluster, or if the second cluster is otherwise unable to process the request, an error code is returned to the first cluster, and an attempt is then made to send the application from the first cluster to a third cluster. It may be necessary to repeat this process several times until a machine cluster is found that accepts the request. Current routing procedures, accordingly, do not provide a high degree of availability for application requests or permit efficient machine utilization.
There is, accordingly, a need for a mechanism for efficiently routing a request for an application in a data processing system that includes a plurality of machine clusters.
The present invention provides a computer implemented method, system and computer program product for routing an application request in a data processing system that includes a plurality of machine clusters. A computer implemented method for routing an application request in a data processing system that includes a plurality of machine clusters includes receiving a request for running an application, and identifying at least one multi-cluster routing policy entry in a list of multi-cluster routing policy entries that matches the request. The application request is then routed to a machine cluster of the plurality of machine clusters in accordance with a policy of the matched at least one multi-cluster routing policy entry. The present invention provides for a high degree of availability for application requests and improved machine utilization options.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
With reference now to the figures and in particular with reference to
With reference now to the figures,
Each machine cluster 104-114 includes a plurality of application servers. For example, as shown in
With reference now to
In the depicted example, data processing system 200 employs a hub architecture including north bridge and memory controller hub (NB/MCH) 202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204. Processing unit 206, main memory 208, and graphics processor 210 are connected to NB/MCH 202. Graphics processor 210 may be connected to NB/MCH 202 through an accelerated graphics port (AGP).
In the depicted example, local area network (LAN) adapter 212 connects to SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive 230, universal serial bus (USB) ports and other communication ports 232, and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus 240. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, while PCIe does not. ROM 224 may be, for example, a flash binary input/output system (BIOS).
HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD 226 and CD-ROM drive 230 may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.
An operating system runs on processing unit 206 and coordinates and provides control of various components within data processing system 200 in
As a server, data processing system 200 may be, for example, an IBM® eServer™ pSeries® computer system, running the Advanced Interactive Executive (AIX®) operating system or the LINUX® operating system (eServer, pSeries and AIX are trademarks of International Business Machines Corporation in the United States, other countries, or both while LINUX is a trademark of Linus Torvalds in the United States, other countries, or both). Data processing system 200 may be a symmetric multiprocessor (SMP) system including a plurality of processors in processing unit 206. Alternatively, a single processor system may be employed.
Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such as HDD 226, and may be loaded into main memory 208 for execution by processing unit 206. The processes for embodiments of the present invention are performed by processing unit 206 using computer usable program code, which may be located in a memory such as, for example, main memory 208, ROM 224, or in one or more peripheral devices 226 and 230.
Those of ordinary skill in the art will appreciate that the hardware in
In some illustrative examples, data processing system 200 may be a personal digital assistant (PDA), which is configured with flash memory to provide non-volatile memory for storing operating system files and/or user-generated data.
A bus system may be comprised of one or more buses, such as bus 238 or bus 240 as shown in
Router 306 performs two levels of routing in topology 300: it first determines which cluster among machine clusters 302a-302m to route to; and then, which server among servers 304a-304n in the selected cluster to route to. In topology 300, all servers in all clusters are directly addressable from router 306.
In topology 400, a different router is associated with each cluster. Thus, in
The present invention provides a mechanism for routing an application request in a data processing system having multiple clusters. The data processing system may be organized in one of topologies 300 or 400, in some combination of topologies 300 and 400, or in another manner. In accordance with the present invention, each router in the topology contains a list of Multi-Cluster Routing Policy (MCRP) entries which the router uses to route requests for applications in an application-specific manner to an appropriate machine cluster. Thus, router 306 in
Each MCRP entry in an MCRP list contains an MCRP scope and an MCRP action. An MCRP scope specifies the requests to which the MCRP entry applies, and is of the following form:
[<cell>[:<application>[:module>]]]
where <cell> is the name of the administrative domain, <application> is the name of the application, and <module> is the name of the application module (for example, J2EE Web Module). If a particular request matches multiple MCRP entries in an MCRP list, the entry with the most specific scope is used first.
An MCRP action is of the following form:
<policy>@<cell>$<clusterOrRouter>[,<cell>$<clusterOr Router> . . . ]
where <policy> is the name of the policy, <cell> is the name of an administrative domain, and <clusterOrRouter> is the name of a cluster or router. The policy specifies whether the policy is a failover policy (wherein if a first cluster is not available, a second cluster is tried) or a load balancing policy (wherein routing is based on specified load balancing criteria). If the policy is a load balancing policy, the policy may also specify the particular load balancing algorithm to use.
Referring to
If the MCRP policy is a load balancing policy, each cluster and/or router to which a router forwards a request is treated as a single server and has an associated weight. An appropriate load balancing algorithm is applied to select which cluster to route to. After the cluster has been selected, then the server within the cluster is selected. If the server level selection is based upon affinity (e.g. HTTP session affinity, WPF (WebSphere Partition Facility) affinity, etc.), a cluster level affinity is also applied so that subsequent requests are routed to the appropriate cluster and then to the correct server.
If affinity does not apply for a request, since clusters may be geographically dispersed and, therefore, have large latency differences, the “weighted least outstanding requests” algorithm in which the cluster with the fewest outstanding request count modulo a cluster weight is selected is generally preferred.
If the routing policy is a load balancing policy (No output of Step 602), an appropriate load balancing algorithm is applied to determine which cluster to route to (Step 618), and the request is routed to the identified cluster (Step 620) A determination is then made as to which server in the cluster to route to (Step 622).
The load balancing algorithm can be one in which server level selection is based on affinity, for example, HTTP session affinity, WPF affinity, etc. In such a case, a cluster level affinity is also applied so that subsequent requests will be routed to the correct cluster and then to the correct server. If affinity does not apply, it is preferred to use a “weighted least outstanding requests” algorithm in which the cluster with the fewest outstanding request count modulo a cluster weight is selected.
The present invention thus provides a computer implemented method, system and computer program product for routing an application in a data processing system that includes a plurality of machine clusters. A computer implemented method for routing an application request in a data processing system that includes a plurality of machine clusters includes receiving a request for running an application, and identifying at least one multi-cluster routing policy entry in a list of multi-cluster routing policy entries that matches the request. The application request is then routed to a machine cluster of the plurality of machine clusters in accordance with a policy of the matched at least one multi-cluster routing policy entry.
The invention can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.
Furthermore, the invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer readable medium can be any tangible apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.
Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.