Server Load balancer Algorithm

Source: Internet
Author: User
Server Load balancer Algorithm
There are many Server Load balancer algorithms (persistent and non-persistent), including the round robin algorithm, least connection algorithm, response time algorithm, hash algorithm, and least connection error algorithm, link bandwidth algorithms. In addition, the actual server can be assigned different weighted values to adjust the allocated traffic. For example, a large server with high performance can be configured with a large weight value, while a smaller weight value can be set for a small server with low performance. To avoid server overload, you can specify the maximum connection threshold for the actual server to avoid overload. Any server can be specified as a backup server or an overflow server of another server to further ensure application availability.

Non-persistent ): Different requests from a client may be allocated to different instances in an actual service group for processing. Mainly include round robin algorithms, least join algorithms, and response speed algorithms. -Round robin algorithm (Round Robin ): Note: Each request from the network is distributed to each internal server in turn, starting from 1 to n and then restarting. Example: This balancing algorithm is suitable for all servers in the server group with the same hardware and software configurations and Relatively Balanced average service requests; -Least connection algorithm (least connection ): Note: Each time the client requests the service to stay on the server, there may be a big difference. As the working time gets longer, if a simple round robin or random balancing algorithm is used, the connection processes on each server may be significantly different, and such results will not achieve real load balancing. The least connections balancing algorithm records the data of each server with internal loads. The record records the number of connections that the server is currently processing. When a new service connection request is sent, the current request will be allocated to the server with the least connections, so that the Server Load balancer is more in line with the actual situation and the load is more balanced. For example, this balanced algorithm is suitable for long-time request service. -Response speed algorithm (Response Time ): Note: The server Load balancer device sends a detection request (such as PING) to each internal server ), then, the server determines which server to respond to the client's service request based on the shortest response time of the internal server to the probe request. Example: This balancing algorithm can better reflect the current running status of the server, but the fastest response time only refers to the fastest response time between the Server Load balancer device and the server, instead of the fastest response time between the client and the server. Persistent ): Requests sent from a specific client are distributed to the same server in the real service group for processing. It mainly includes: A. IP-based algorithm -Persistent IP (PI): select a server based on the user IP address. -Hash IP (HI): select a server based on the hash value of the user's IP address. -Consistent hash IP (CHI ): B. Header/request-based algorithms -Hash header (HH): select the server based on the HTTP header in the user request message; -Persistent hostname (ph): the server is selected based on the hash value of the hostname in the HTTP header in the user request message; -Persistent URL (PU): the server is selected based on the static correspondence between the URI tag and the value. -SSL session ID (sslsid): select a server based on the SSL session ID. C. Cookie-based algorithms -Persistent cookie (PC): select the server's static correspondence relationship based on the cookie name/value of the user request package; -Hash cookie (HC): select the hash value correspondence relationship of the server based on the cookie name/value of the user request packet; -Insert cookie (IC): select the server to insert a cookie to the server response packet based on the server Load balancer; -Re-write cookie (RC): select the server to rewrite the cookie value to the server response packet based on the server Load balancer. (The offset of the cookie value must be specified for rewriting.

 

 

J2EEApplication Server

J2EE is an open architecture that uses JAVA Technology to develop and deploy enterprise applications. In this architecture, enterprise application developers can freely choose the application server where their applications reside. Currently, popular J2EE application servers mainly include Bea companies WebLogic , IBM WebSphere and Oracle IAS .

WebLogic is the Bea company's J2EE application server, WebLogic cluster technology can work with a group of servers to replicate the application presentation layer and application logic layer between multiple machines, load Distribution of key business systems. WebLogic allocates the load to all service instances in the cluster according to certain policies, so that each service instance can make full use of its capabilities, this can be achieved through the WLS proxy plug-in or an independent Load Balancing hardware. Note: WebLogic can copy httpsession objects and stateful sessions EJB , however, as WebLogic processes the session Status, horizontal image storage is used. method, therefore, we recommend that you do not use hardware Load Balancing when using WebLogic Server Load balancer.

WebSphere is the IBM J2EE application server, multiple WebSphere application servers can be used to form highly scalable Server clusters, for client requests sent to the WebSphere server cluster, WebSphere can Achieve dynamic load balancing. Because the WebSphere adopts vertical shared storage for processing the session Status method, therefore, when using hardware load balancing, the WebSphere cluster can work more than two nodes.

IAS Oracle is an Application server based on the J2EE standard, it is used to develop, deploy, and manage Internet applications. IAS Server Load balancer essentially refers to how a single CPU or multiple CPU Oracle9iAS instances are distributed from the client.. IAS provides load balancing and Server Load balancer ( servlet and EJB container instances use multiple load balancing algorithms to balance requests, in addition, Server Load balancer is enhanced for RMI and soap requests. function ), IAS can also work with third-party server Load balancer products (such as big-IP and Alteon ) applicable to non-conference Session status and session status.

In short, WebLogic , WebSphere , and Oracle IAS provides load balancing technology, it can achieve load balancing and Failover functions, and can combine multiple machines to form a large and stable enterprise application.

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.