J2EE Clustering 2

zhaozj2021-02-11  211

J2EE Clustering 2

Cluster and error recovery services

Providing J2EE services on a Server is negligible compared to the entire cluster. Given the complexity of cluster technology, each Application Server has its own unique implementation. You should understand how they achieve clusters and Erity Bean, Stateless Session Bean, Stateful Session Bean, and JMS error Restore. Many vendors claim their support of cluster components, but they are often involved in components in the cluster. For example, BEA WebLogic Server 5.1 supports clustering Stateful session bean, but if the server itself collapsed, all the states are also lost. Customers have to recreate the Stateful Session Bean, making the original in the cluster. Us until the BEA WebLogic 6.0 released, Stateful session beans implemented memory Copy to cluster and error recovery.

All Application Servers supports EJB Clustering, but has a big difference in support for automatic error recovery that can be configured. Some Application Servers do not support automatic error recovery of EJB Client. For example, Sybase Enterprise Application Server supports Stateful session bean error Recovery, the premise is that you are from the database or by serializing the status of the Load Bean. As mentioned earlier, the BEA WebLogic 6.0 supports the status of the STATEFUL Session bean by memory replication. Most Application Server can run in the cluster. JMS, but Topics and Queues that are named by individuals do not provide load balancing and error recovery. This way you may need to purchase a clustered JMS product, such as SonicMQ, to get topics and queues load balancing.

Another important consideration, what we have to mention now is: httpsession error recovery.

HTTPSESSION error Recovery When the server originally created a session, HTTPSESSION error recovery allows the user to seamlessly get session information from another server. Bea WebLogic Server implements SESSION information memory replication, and HP Bluestone Total-E-Server With centralized Session Server, it comes with HA backup. Silverstream Application Server and Sybase Enterprise Application Server uses a centralized database or file system, and each Application Servers reads you.

The main disadvantage of session persistence with database / file system is: when storage large or many objects are limited in Session. Users add an object to httpsession to httpsession, all objects in the session must be serialized and Write a database or shared file system. Most database implementation session persistence Application Server as possible to store Object as little as possible, but this limits the structure and design of the Web Application, especially when storing user data with HttpSession.

The memory-based session persistence writes the SESSION information in the memory to a backup server. There are two practices. The first one writes the httpsession information to a centralized status server. All machines in the cluster HttpSession Objects is written to this Server. Second method, each node in the cluster arbitrarily selects a node stores session information. Each user adds Object to httpsession, which is sequenced separately in writing there Backup Server.

In the above two methods, if the number of machines in the cluster is small, use a dedicated State Server than any specified backup server, which saves CPU to process Transaction and dynamic web pages.

On the other hand, when the number of machines of the cluster is large, special State Server is a bottleneck, and the consumption of any designated Backup Server replicate memory will grow as the number of machines increases. When the machine is added, use specialized State Server, you need to add more RAM and CPU. With any specified Backup Server, you only add the machine, and the session will be averaged between all machines. Based on memory-based persistence provides flexible Web application design, scale and high reliability. Now we will check a single order failed.

A single-point failed cluster service that does not provide a backup will cause a single point to fail, they will cause the entire cluster or part of the application crash. For example, WebLogic JMS can only have a Topic run in a machine in the cluster. If that machine happens to crash In the application, the application relying on JMS Topics can not work until another WebLogic Instance starts (note that only Durable Message is sent when the new Server Instance is started.)

Check if your cluster has a single point failure. If there is, you have to estimate whether you can meet the application needs.

The scalable topology is mentioned below.

Flexible telescopic topology clusters also require a flexible topology layout. Most Application Server can also act as HTTP Server, see Figure 1.

Figure 1. Multiple topology

This structure is good when your Website is a dynamic web page. However, when most is a static page, it is very expensive to expand the price of the website because you have to add Application Server to a static HTML page request. So The appropriate approach is to extend the static part, increase the web server, to extend the dynamic part, increase the Application Server, as shown in Figure 2.

Figure 2. Separated topology

The main drawback of the above figure is: increasing the dynamic page request delay. But compared to flexible independent extensions, it is slightly.

Finally, the discussion of Application Server is terminated in maintenance.

A large number of machines in the maintenance cluster generally avoid maintenance issues: maintain the cluster operation, notify the application changes. Theapplication server should provide the Agent to do the collapse of the main service, then restart them. Or activate the Backup Server. Further, Application Server should provide A simple way to update and synchronize all the Server in the cluster.

Sybase Enterprise Application Server and HP Bluestone Total-E-Server provide files and configuration synchronization services. Sybase Enterprise Application Server provides these services on hosts, groups, and cluster levels. Bluestone only provides host Level. If you want deploy big Application or Many Application, it takes a long time. Bea WebLogic Server only provides configuration synchronization. In both, configuration synchronization plus Storage Area Network better, because you can write change to a logical storage medium, so All machines can receive changes in Application File. Each machine only needs to receive configuration changes from a centralized Configuration Server. SilversTream Application Server is loaded with Dynamic Class Loader from the database into Application Files and Configuration. Dynamic Class Loader makes it more convenient to receive the APPLICATION Server reception.

We have discussed an important feature that Application Server needs to consider. The following is a comparison of 4 popular Application Server according to our criterion.

Application Server Compare

Since we have learned the general knowledge about the cluster, let us focus on each Application Server, link the and the real world. We have to be:

HP Bluestone Total-E-Server 7.2.1 Sybase Enterprise Application Server 3.6 Silverstream Application Server 3.7 BEA WebLogic Server 6.0 Each Application Server is included in an HA structural diagram, followed by a summary of its important feature.

HP Bluestone Total-E-Server 7.2.1

Figure 3. HP Bluestone 7.2.1 topology

Cluster General Characteristic Summary: Bluestone implements a stand-alone JNDI Tree cluster. As a PLUG-I runs LBB in Web Server, the Load balance and error recovery service providing HTTP request is available. LBB knows which UBS (Universal Business Server) What Application can correctly orient the traffic. Erb Proxy Service and Proxy LBB supports EJB Proxy Service's main disadvantages of EJB Proxy Service Increase the delay of each EJB request, and It runs with UBS on the same machine. EjB proxy service and UBS Stub support UBS crash, but does not support error recovery of hardware crash. In the case of the latter, the error recovery is configured through the client. TXT or Proxy LBB Configure the APSERVER.TXT. The client's APServer.txt lists all components in the cluster. When new components are added, all customers need to update this file or handmade one-by-one host with BAM (Bluestone Application Manager) Update. Configure APServer.txt at the Proxy LBB to isolate the changes in the user and the cluster, but the new delay is introduced for the EJB. HP Bluestone is the only APPLICATION Server that provides clustering and load balancing JMS.

Cluster concentration time: relatively centralized and global shadring JNDI TREE, least.

HTTPSESSION error recovery: centralized State Server and Backup State Server or database, memory replication.

Single point failed: no

Flexible cluster topology: support all cluster topologies.

Maintenance: Bluestone is better than other Server.Bluestone, which provides a dynamic application loader (Dynamic Application Launcher Dal), which is called when the application or machine crashes. DAL can restart the application on the host or backup machine. In addition, Bluestone It also provides a configuration and publishing tool called Bluestone Application Manager (BAM) to deploy Application Package and their related files. The only disadvantage of this tool is that only one machine can only configure a machine - it is inconvenient to large clusters. .

Sybase Enterprise Application Server 3.6

Figure 4 Sybase Enterprise Application Server 3.6 topology

Cluster General Characteristics Summary: Enterprise Application Server implements a centralized JNDI Tree cluster, with hardware load balancer to complete the load balancing and error recovery of HTTP requests. The two Name Servers in a cluster each can process HTTP Request alone, but Performance, it is best to deal with JNDI Request.

Enterprise Application Server 3.6 No Web Server Plug-in, but in February 3.6.1 EBF (Error and Bug Fixes) version will be available. It supports the error recovery between STATEFUL, STATELESS SESSION bean and Entity Bean. Remember Enterprise Application Server provides any monitoring agent or dynamic application loader, you need to restart a third-party product for a single point or automatic Server, such as VERITAS Cluster Server.Enterprise Application Server does not support JMS. Cluster concentration time: Centralized time depends on Name Server The number of members Server. In three cluster implementations, the concentration of centralized JNDI Tree clusters is the worst. Although the concentration time indicator is important, Server can use the object bind to Name Server while Start receiving request (of course, it is best not to do this).

HTTPSESSION error recovery: httpsession error Restore is implemented with a centralized database, and memory replication is not supported.

Single point failure If you run multiple Name Server, there is no single point failed.

Flexible cluster topology: Topology is limited to no web server plug-in.

Maintenance: Sybase uses files and configuration synchronization, provides the best choice for Application Deployment. It can synchronize on Component, Package, Servlet, Application, and even Web Application Level. You can also choose to synchronize the entire cluster, a set of machines or individual Host. Great function! But if there are too many machines in the cluster, synchronization will continue to be a long time. It is a weakness of its weakness, which means you have to buy third-party products, such as Veritas Cluster Server.

Silverstream Application Server 3.7

Figure 5. Silverstream Application ServerDispatcher Topology. Figure 6. Silverstream Application Server WSI Topology

Cluster General Characteristics Summary: When setting the Silverstream cluster, there are two configurations: based on Dispatcher and web server integration-module (Web Server Integration-Module WSI). In Dispatcher-based clusters, users connect Dispatcher or hardware-based Dispatcher - For example, Alteon 180e, then Dispatcher redirects HTTP to a machine of the masses. From that moment, users are physically bound. Therefore, in this way, a cluster and one There is no difference between Taiwan Server. The main disadvantage is that static parts and dynamic parts cannot be extended independently.

In a WSI-based cluster, the user first connects Dispatcher, the latter controls the Web Server's load balancing and HTTP request error recovery. Each web server has a Plug-in point to a load balancer in the cluster. WSI cluster is not used Direction, each HTTP request can be balanced on any machine. The sub-load balancer is used when the Application Server layer crashes. A WSI structure is superior to the Dispatcher structure: can expand the static and dynamic parts independently. However, the main shortcomings It is necessary for ArgopersistenceManager to make HTTPSession error recovery. In any way, users cannot get errors and recovery between methods. EjB error recovery is completely responsible. Finally, SilversTream does not support clustering JMS.

HttpSession error Recovery: Silverstream provides HttpSession error recovery with centralized databases and ArgopersistenceManager. Unfortunately, this solution has all rights issues. Do not use the session information into the database, and use a product ArgopersistenceManager Class - A big shortcoming.

Cluster concentration time: Relative centralized and global shadli JNDI Tree cluster, least.

Single points fail: The above structure is not. Flexible cluster topology: support all cluster topologies.

Maintenance: Cache Manager and Dynamic Class-Loader provide convenient ways for deploy and update running applications, basically do not bother the current active client. When the application is updated on a Server in the cluster, the updated part of the update Enter the database, then the cache manager sets the cache on all machines to invalid, force them to re-get new Application. There is only one shortcomings, it is to take the time to remove the application from the database, transfer to memory.

BEA WebLogic Server 6.0

Figure 7. BEA WebLogic Server 6.0

Cluster General Characteristics Summary: WebLogic Server implements global sharing JNDI Tree clusters. This work mode is written to the global shared JNDI Tree. Then Server uses this global Tree. Backup to provide services, enable users to perceive all objects in the cluster. Users STUB can do the entire cluster that means they request them to the original Server, but also have other Application Server's information. For information. This, Stub can transparently perform error recovery. A unique feature of Weblogic Server is the memory replication of Stateful session bean and configurable EJB Remote Objects Auto error recovery. WebLogic defines the Clusterable to a service in the cluster. JMS is Such a service, but each Topic or Queue is only running on a Server, so it cannot load balancing and error recovery - a big disadvantage of WebLogic JMS implementation.

HttpSession error Recovery: WebLogic Server Recovery to HTTPSESSION error recovery by copying memory in any specified Backup Server or Database Server. The cluster is selected. If the primary server collapses, Backup Server becomes the Lord. Server, re-select a Backup Server. WebLogic has a unique feature: cookie's independence. Both HP BlueStone and Enterprise Application Server require cookies to make HTTPSESSION error recovery, but WebLogic can use the information encrypted in the URL to direct user orientation Go to Backup Server.

Single point failed: JMS and Administration Server.

Flexible cluster topology: support all cluster topologies.

Maintenance: WebLogic's weakness is maintenance. Although BEA has taken positive measures in configuration synchronization, WebLogic Server still does not have any monitoring agent, dynamic application loader, or file synchronization service. So you need to fail to purchase the first place or HA purchase Three-party programs. If you use SAN, you don't have to file synchronize, but most developers have just begun to recognize the benefits of SAN.

The analysis is generally stronger, and the cluster implementation is the most thorough. HP Bluestone Total-E-Server 2.7.1, Sybase Enterprise Application Server 3.6, Silverstream Application Server 3.7 is arranged in turn.

Choosing the right Application Server requires trade-off. If you have EJB Clients (Applet and Applications), Web Clients, Web Client, for the httpsession (for caching), requires extended and error recovery, you need Bea WebLogic 6.0. If you Application requires a lot of JMS, vast majority of clients, Bluestone may be better. From the cluster point of view, Sybase Enterprise Application Server 3.7 lacks important cluster features, such as JMS, HttpSession memory, web server plug-in Wait. However, Sybase Enterprise Application Server 3.7 does bring files and configuration synchronization services. If you use SAN, these are a bit negligible. The cluster of Silverstream Application Server is unpleasant, lack of clustering JMS, HttpSession memory replication And error recovery, etc. Conclusion

In this article, you have gained a general understanding of the cluster, a cluster approach and important cluster service. We examine the advantages and disadvantages of each Application Server, discuss the characteristics related to the cluster. After these knowledge, you know how to build High reliability and scalability clusters. But this is just the beginning of learning, find some Evaluation Clustering License, and Application Server, verify. In the second part, we have to start writing code, verify the commitment of the Application Server supplier We will also use the J2EE Java PET Store routine to do load and cluster concentration testing.

转载请注明原文地址:https://www.9cbs.com/read-6034.html

New Post(0)