Clustering, load balancing, and distributed system architecture

Source: Internet
Author: User

1. Cluster 1.1 definition:

is a set of independent computer systems that form a loosely coupled multiprocessor system that communicates between processes over a network. Applications can deliver messages over network shared memory for distributed computers.

is a group of connected computers, from the outside it is a system, each node can be a different operating system or computer composed of different hardware. A cluster that provides Web services is a large Web server to the outside world. However, the nodes of the cluster can also provide services separately.

1.2 Load Balancing System:

All nodes in the cluster are active, and they share the workload of the system. Generic Web server clusters, DB clusters, and application server clusters are of this type.

A load Balancer cluster is typically used for Web servers, database servers, for corresponding network requests. This cluster can, upon request, check for servers that accept fewer requests, are not busy, and transfer requests to those servers. From the point of checking other server states, load balancing and fault tolerant clusters are very close, and the difference is more in number.

1.3 Cluster system mainly solves the following problems:
    • High Reliability (HA): The use of cluster management software, when the primary server failure, the backup server can automatically take over the work of the primary server, and timely switch to the past in order to achieve uninterrupted service to users.

    • Load balancing: The load pressure is allocated to each computer in the cluster according to some algorithm to reduce the pressure on the primary server and reduce the hardware and software requirements of the primary server.
      High-performance Computing (HP): The full use of the resources of each computer in the cluster to achieve parallel processing of complex operations, often used in scientific computing fields, such as genetic analysis, chemical analysis and so on.

2. Load Balancing System

First from the cluster to get "" "Springmvc4 MyBatis Integration Framework Source code

Load balancing and DNS load balancing (more commonly used), IP load Balancing, reverse proxy load balancing, and so on, that is, there are servers A, B, C in the cluster, they are non-impact, mutual irrelevant, any one machine down, will not affect the operation of other machines, when the user to a request, The algorithm of the load balancer decides which machine to handle, if your algorithm uses the round algorithm, has the user A, B, C, then respectively by Server A, B, c to handle;

2.1 DNS-based load balancing

Load balancing is achieved through random name resolution in the DNS service, where the same name can be configured for multiple different addresses in the DNS server, and the client that eventually queries the name will get one of the addresses when parsing the name. Therefore, for the same name, different customer opportunities to get different addresses, they also access different addresses on the Web server, so as to achieve load balancing purposes.

2.2 Reverse proxy load balancing (such as apache+jk2+tomcat this combination)

A proxy server can be used to forward requests to internal Web servers, allowing the proxy server to transfer requests evenly to one of several internal Web servers for load balancing purposes. This proxy approach differs from the normal proxy approach, which is that clients use proxies to access multiple external Web servers, which are used by multiple customers to access internal Web servers and are also referred to as reverse proxy mode.

2.3 Nat (Network Address translation)-based load balancing technology (e.g. Linux Virtual Server, LVS)

The network address translates to the conversion between the internal address and the external address so that the computer with the internal address can access the external network, and when a computer in the external network accesses an external address owned by the address translation gateway, the address translation gateway can forward it to a mapped internal address. Therefore, if the address translation gateway can convert each connection evenly to a different internal server address, then the computers in the external network will communicate with each other on the server to which they have converted, thus achieving load sharing.

3. Distributed refers to the distribution of different businesses in different places.

Clustering, however, refers to centralizing several servers together to achieve the same business. Each node in the distribution can be a cluster. Clusters are not necessarily distributed.

Example: For example, Sina, the number of people who visit, he can do a cluster, the front of a response server, the next few servers to complete the same business, if there is business access, the response server to see which server load is not very heavy, will be to which to complete.

Distributed, from the narrow meaning of understanding, but also similar to the cluster, but its organization is relatively loose, unlike clustering, there is an organizational, a server collapsed, the other servers can be top up. distributed to each node, the completion of a different business, a node collapsed, which business is inaccessible.

Between these three basic types of clustering, there are often intersections and mixes. For example, in a high-availability cluster system, load balancing can also be achieved between its nodes, while still maintaining its high availability. There is also a general statement: Cluster is a means, load banlance is one of the goals.


Clustering, load balancing, and distributed system architecture

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.