![]() |
![]() |
About clustering technology in WebLogic
Introduction
WebLogic Servers Let's define those concepts. With WebLogic, "scalability" doesn't mean that the service speed increases to any one client, but it does provide faster service to more clients by balancing requests (load-balancing) across the cluster, and by adding more servers to the cluster as needed. And WebLogic's "fault tolerance" -- which is a requirement of high "availability" -- means that a WebLogic Server continues to provide services transparently, even in the face of such failures as:
Clustering also offers ease of maintenance, so that an administrator can selectively shutdown individual servers in a cluster to perform maintenance on each, while continuing to provide uninterrupted service to all clients. Clustering architecturesThere are three general categories of traditional clustering architectures, based on how each server in the cluster accesses memory and disks, and whether servers share a copy of the operating system and the I/O subsystem. These three categories are:
In addition, there is also the hybrid common-disk shared-nothing model, which uses a shared-nothing architecture on top of shared-disk hardware. Only one server at a time can access a disk, but if that server fails, another can provide uninterrupted service. There are other common attributes that help define how a cluster operates.
Failover topologiesWhat happens when a server in the cluster fails -- how one server takes over for another -- varies according to the cluster model. There are several common failover topologies.A common topology is one-to-one, in which a pair of tightly linked servers act for each other in the event of a failure. This topology is supported by the notion of the active/active cluster, where one server can automatically assume the workload for another in the event of a failure. IP switchover/IP impersonation is also a likely attribute of a one-to-one failover topology. Another topology is one-to-many, in which any of several servers in the cluster may assume the workload for a failed server in the group. Also common is many-to-one, in which one server in a cluster may assume the workload for any number of servers in the cluster that fail. No matter whether a server is in a cluster or stands alone, the server should be able to perform application restarts to automatically restart failed application process. Studies have shown that a large majority of server failures are caused by software, not hardware, faults, and that software problems cause as much as 4 times more downtime than hardware. Replication and clusteringReplication, which mirrors data and/or state from one server to another, is essential for all clustering architectures. Replication facilitates both scalability and availability. Although replication may be used internally in the cluster, the bulk of a replicating server's work is for client requests, which is either a query (read) or an update (write). The hardest part of replication is maintaining consistency across multiple copies of the data, which means tradeoffs between:
To reduce the number of replicas and still allow scaling, replication implementations often distinguish between primary (queries and updates) and secondary (query-only) servers. Primary servers are entrusted to be the authority on data, and an update operation is considered complete as soon as the primary server(s) acknowledges it; then updates are propagated to secondary servers. There are a wide range of replication architectures. At one end of the design spectrum is the model in which each item of data is entrusted to a single primary server, which simplifies consistency. But this approach may not work well if many clients want to update data on the same primary server, or if updates take an unusually long time to propagate to the secondary server. This model is most appropriate when the ratio of queries to updates is high. At the other end of the architecture spectrum are those models designed for a relatively low ratio of queries to updates. This is most commonly handled by using only primary servers. Many applications have a relatively low query-to-update ratio but still require strong computational consistency. Of particular interest are implementations in which replicated information is kept in memory rather than on disk. In many clusters, portions of the state of a failed server can be recovered only if it was written to disk. Replication may not include the internal state of an object. If the cluster doesn't support internal state replication, it can be used only to support scalability and availability of "stateless" services, that is, of services that do not require any knowledge of a client's previous work to continue to provide services to that client. Distributing workload for stateless services may be based on a variety of factors, including server load, server characteristics, application data partitioning, time of day, and request priority. Replicating internal state is generally very expensive; most commonly, replication of internal state is to support availability. For example, a worldwide financial corporation organization might replicate its trading services from a cluster in a London office to a cluster in a Tokyo office as the sun rises in Asia and sets in Europe, automatically and transparently transferring all transactions from one office to another for 24-hour service. Or a worldwide service organization might replicate its call tracking application continuously to multiple clusters strategically located to provide faster access and to reduce long-distance network traffic. Some failsafe applications might replicate continuously to provide an emergency backup. Most clustering products make data accessible for a replicated process only at the point at which it is written to disk; this holds for all cluster architectures except the shared-memory model. And except for the pure shared-nothing model, all cluster architectures rely on replicated processes to access the same disks, rather than actually copying data. Most commercially available clustering solutions support only process pairs, which consist of a primary that does all the work and a secondary that can take over in the event of a failure of the primary. Some uses of replicated state of internal objects are clearly useful, particularly managing the transient bookkeeping information needed by the distributed system itself. Persistence and clusteringReplication isn't necessarily the best -- or the only -- choice if a cluster must support scalability of stateful objects. Many industry leaders and analysts believe -- even if the current replication technology were not so immature -- that replication is overly complex and too inefficient to consider it as a real solution for keeping up with an object's state. One alternatives to keeping in-memory replicas of objects with internal state, particularly user data, is to keep stateful components of a distributed system in an underlying persistent datastore, preferably a transaction-backed database. How clusters are connectedCluster communications are often via a high-speed, exclusive connection -- an interconnect or a system area network that is used only for cluster-related communications. Interconnects may be based on Fast Ethernet or FDDI, and there are even more specialized solutions that provide high bandwidth, low overhead, low latency, and more reliability. These may depend on special hardware.Cluster communications support both internal management functions as well as the transport of user traffic. Some of the internal management functions include:
WebLogic Clusters
With release 4.0, WebLogic provides clustering of RMI
Future releases will include support for more administrative features to make tuning, configuration, and upgrades as easy as possible. How WebLogic Clusters differ from traditional cluster modelsWebLogic Clusters descend from a fundamentally different set of constraints than those that define more traditional cluster architectures. Traditional clustering models generally depend on homogeneous hardware, that is, a set of machines that all run the same operating system and may take advantage of proprietary protocols and communication mechanisms, like shared disks, multitailed disks, and high-speed interconnects. A hardware-homogeneous cluster may also offer a single-system image across traditional operating system services, so that clustering can be transparently exploited by a wide range of applications. Because WebLogic is written completely in Java, it is also completely platform independent. You might run a WebLogic Cluster on an arbitrary mixture of HP, Sun, NT, and IBM servers. The great advantages of such a clustering model -- that the cluster is no longer constrained by its hardware -- also poses some challenges in building efficient networking and server-to-server communications. Although WebLogic Clusters must use commodity networking, network file systems, and database technology for server-to-server communications, it exploits these basics with a sophisticated, high-performance, multiple-personality architecture that delivers its standards-compliant services in an easy-to-use framework that runs, literally, anywhere. ArchitectureWebLogic Clusters are designed to work across a network topology that may include a variety of heterogeneous hardware and operating systems. Technically, such a cluster environment conforms to a shared-nothing architecture made up of a set of independent, networked machines. However, given that there is probably a database that is part of the WebLogic environment, in practice a WebLogic Cluster is likely to be operated as a shared-disk cluster architecture.
WebLogic clusters may host EJB, RMI, and servlet services. EJB and RMI
have different expectations about server architecture, and WebLogic is
modeled for both: a multitier
In a multitiered architecture, clients handle direct interaction with
end users, while application servers host the business logic and
coordinate communications, synchronization, and
transactions. Supporting these operations is one or more persistent
storage devices to provide durable, transactional management of the
underlying data. In a peer-to-peer architecture, however, each node
may host and/or invoke objects, in various distributed computing
models (including CORBA
WebLogic is based on a lightweight message-passing kernel that
supports both multitier and peer-to-peer functionality. WebLogic's
kernel offers a Remote Java Virtual Machine
The RJVM also supports routing (forwarding messages through an
intermediate server). One use of routing is session
concentration, or acting as a gateway from frontend clients to
backend servers. Another use of routing allows WebLogic to operate
within the constraints of the applet Clustered naming serviceClustered services are advertised from within a cluster-wide replicated name tree. WebLogic implements the JavaSoft Enterprise standard for naming, JNDI (Java Naming and Directory Interface), to provide transparent naming and directory services. Access to clustered services is gained through a cluster-wide JNDI-compliant naming service, which is itself replicated across the cluster so there is no single point of failure. To offer a clustered service, a server advertises a provider at a particular node in the replicated naming tree. Each server adds a stub for the provider to a service pool stored at the node in its copy of the tree. The client finds a service object for use by first obtaining an initial context. This context grants complete location transparency, so that the client does not need to know or care that resources it will use may be located on many servers across the cluster. In fact, if a server providing a service fails while it is servicing the client request, that request will be transparently redirected. The JNDI initial context also allows more servers to be added to the cluster to service clients in a completely transparent manner. WebLogic Servers can dynamically join and leave a cluster with the WebLogic Service Advertisement Protocol (TSAP). TSAP supports the processes that keep track of which services are available from which Server at any moment in time; it also tracks and mediates conflicts of different services that may be offered at the same node in the cluster-wide JNDI naming tree. Because TSAP currently uses IP multicast, the hosts in a WebLogic Cluster should be in the same LAN. A cluster is configured by a system administrator by setting certain properties. Each individual server is assigned a set of properties, including its cluster membership and which service providers it hosts. The members in the WebLogic Cluster exchange such information with each other as each server starts up, and as the information changes dynamically. There is no notion of "cluster startup," since servers may join and leave while the cluster continues to operate smoothly. Features for writing clustered applicationsWebLogic Clusters offer a variety of features that make writing clustered applications easy. Objects that are bound into the cluster-wide JNDI naming tree, even if they are not replicated, are available to any client using the cluster's services, so long as the WebLogic Server hosting that object is available.
In addition, stateless
WebLogic automatically produces intelligent, failover stubs For HTTP Servlets, load-balancing, scalability, and failover are supported by a DNS round-robin or other network-based technologies. The session state of a servlet is cluster-wide, and any invocation of a servlet can be handled by any instance available in the cluster. By definition, servlets are a stateless service unless the servlet takes advantage of WebLogic's servlet session management feature. WebLogic's HTTP Servlets use the standard JavaSoft Session Management API to handle persistence for servlet sessions, which provides standards-based, non-proprietary solution for such applications as web shopping baskets and user-preference-driven web applications. Stateful (session or entity) Enterprise JavaBeans may also be clustered, although it is necessary to rely on the client to protect its conversational state through a transaction and to make its state persistent through some sort of file- or database-based persistence mechanism. The bean home/factory may be bound into the cluster-wide JNDI naming tree so that multiple WebLogic Servers offer the service. Any call to create the bean will perform automatic load balancing and failover, and if more than one instance of a bean home is bound within the WebLogic Cluster, the underlying stub will make a load-balancing decision before the action bean creation takes place, with a pluggable strategy that chooses from among all the instances of the service available. The client application will always find service if it is available anywhere in the cluster. Clustering of other "conversational services," like JDBC connection pools, will be offered in a future release. Summary
This paper presents an overview of clustering technology, including a
brief discussion of cluster architectures, failover topologies, and
the use of replication and persistence in a clustered environment. In
addition, this paper summarizes how WebLogic Clusters fit into the
clustering universe and a general overview of the WebLogic Cluster
model.
|
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|