Distributed clustering Technology

Source: Internet
Author: User
Tags jboss application server

1. Distributed clusters

1.1. Distributed System architecture

The benefits of Distributed system architecture are two: first, the system can be applied to enterprises of all sizes, (each node in the diagram represents an application server and not necessarily a computer in a physical sense); second, the server can be easily managed and the administrator can log on to any remote client. Server management based on a Web browser.


1.2. Enhanced security features and transaction processing capabilities

Provide value-added services such as authentication, authorization mechanism, encryption mechanism and secure data storage to provide users with secure and reliable distributed enterprise-class applications; To ensure the integrity of application data and business logic, deadlock detection, concurrency control, and JMS global transactions are supported in addition to fully compliant transaction management.

1.3. Scalability and high availability of server clusters

Multiple application servers constitute a server cluster, the advantages of which are: through load balancing and failure recovery mechanism can solve the network congestion problem, the service is provided nearby to achieve geographical independence, can provide users with better access quality, can improve server response speed, improve server and other resources utilization efficiency , avoids the problem of single point failure in key parts of the network, and enhances the scalability of the server.

A clustered system is a group of loosely-combined servers that form a virtual server that provides a unified service to client users. For this client, it is common to access the cluster system without realizing that its service is provided by the specific server. Cluster systems should typically have special features such as high availability, scalability, load balancing, failure recovery, and maintainability.

High availability is the most basic requirement of cluster system, and it is an evaluation of the stability of the whole system. Scalability is the ability of the entire system to maintain effective response times as the number of client users increases. In a scalable system, as the number of users increases, the effective response time is longer, linear relationship, which also reflects the peak load processing capacity of a system, but as more and more systems are on the Internet, the peak load of user access to effectively predict the change is impossible. The rapid increase of user access makes the effective response time of the system non-linear, the response time becomes long, and the system is overwhelmed and shut down. The general solution is to upgrade the system hardware system, or by increasing the server. However, unreasonable increase of the server can only make the whole cluster system become more and more large, the complexity of the system means that the system failure rate is higher, along with the overall system reliability, maintainability will be reduced.

Therefore, the availability and scalability of a system is a pair of contradictory relationships, and the implementation of the whole cluster system has a great relationship.

1.4.EJB Technology

EJB is the core of the Java EE application platform. In the EJB2.0 specification, Sun defines the EJB as follows: EJB is a component architecture for developing and deploying multi-layered, distributed, object-oriented Java application systems across platforms. There are three types of EJB components: Session bean, Entity bean, message-driven bean. Where the session bean is divided into stateful and stateless two kinds.

The core of the EJB server is to provide one or more EJB containers (Container) used by the EJB. The EJB container manages the EJB that it contains, provides the running environment for the EJB component's survival and execution, and also is responsible for the EJB's transaction management, security management, resource access control and some exception handling. The EJB container does not allow the client program of the Java EE to directly access the EJB object in the container, when a client user wants to access an EJB, The EJB specification requires the client to locate the bean's home interface using the Java name and directory interface Jndi (javanaminganddirectoryinterface) API.

1.5.EJB server Cluster

The cluster of EJB server is a kind of cluster method based on component, and it is very different from common webserver cluster technology. The methods implemented are not the same. And because the EJB specification does not provide any support for clustering standards, even if some vendors in the EJB server provides cluster features, but how to implement the cluster is also determined by the manufacturer itself. The methods of implementation are also different. At present, most of the Java EE application servers provide clustering functions, such as Beaweblogic application Server, open source JBoss application Server, Sybase's Java application server and so on. In the EJB server cluster design, load balancing (loadbalance), EJB cluster and httpsession cluster technology are the main technologies involved in the design. The implementation of EJB cluster is the core of the whole system implementation.

2. Load Balancing (loadbalance)

The main purpose of loadbalance is to spread the load of the access system on different machines, improve the throughput and concurrency of the whole system, it can make many servers share some heavy computing or IO tasks, thus eliminate network bottleneck and improve the network's flexibility and reliability. The common methods are as follows:

    • Cyclic DNS

DNS load balancing is a simple and efficient method that uses a simple domain name query IP address to achieve a simple load balancing. Any given address, the DNS server has an IP address pool corresponding to it. Each time a request is made to convert a domain name to an IP address, the loop returns the next address in the IP address pool. So it is called Dnsround-robin. When a client accesses, a DNS name is passed to the InitialContext clients requesting Jndi, and as the URL of the naming server, each DNS name is converted to a different address, using this technique, Each client Initailcontext request is sent directly to a different server. One of the major drawbacks of load balancing is that, once a server fails, even if DNS settings are modified in a timely manner, there is still time to wait (because DNS requires a certain refresh time) to function, during which some client user access will still be sent to the failed server.

    • Software Proxy

The software proxy maintains an open connection to a series of servers. When a client accesses a server, it must go through the software agent, which can redirect a user's access to a server through some load balancing algorithms (such as a dnsround-robin, random method, Access tradeoff algorithm). This software agent method can detect the server panic or no response in time, and effectively avoid the failure access in the Dnsround-robin method.

    • Hardware Equalizer

This kind of hardware equalizer generally uses the address translation technology, maps an external IP address to multiple internal IP addresses, and dynamically uses one of the internal addresses for each TCP connection request to achieve load balancing purposes. It is generally possible to use a fourth layer (or more than 4 layers) of the switch, which is based on the IP address and TCP port for virtual connection Exchange, directly send the packet to the appropriate port of the destination computer. Through the switch, the initial connection request from the external can be connected to the internal multiple addresses separately, thus establishing a virtual connection for load balancing. This fourth layer Exchange is based on hardware chip, so the network transmission speed and exchange speed far more than the General software agent. Hardware equalization can be achieved with CiscoCSS11150 (a l4switch).



Distributed clustering Technology

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.