LVS load balancing cluster theory to explain

Clustering Concepts

Cluster Introduction

  • Cluster (Cluster): consists of more than one main clause, but only outside the performance as a whole
  • In Internet applications, with the sites performance hardware, the impact speed, service reliability, increasing data reliability, a single server powerless.
  • Solution: use expensive minicomputers, mainframes; use ordinary server build cluster.

Cluster Category

  • According to the target cluster for which differences can be divided into three types
  1. Load-balancing clusters
    in order to improve the responsiveness of applications, handling more access requests as much as possible, reduce latency goals and achieve high concurrency, high-load (LB) overall performance. LB split load distribution algorithm depends on the master node.
  2. High availability cluster
    to increase application reliability, minimize downtime as the goal, to ensure continuity of service, achieve high availability (HA) fault tolerance effect. HA works includes a duplexer and a master-slave modes.
  3. High-performance computing clusters
    to improve the application of the system CPU speed, scalable hardware resources and analytical capacities, to obtain the equivalent of a large, high-performance supercomputers (HPC) capabilities. High performance is dependent on the high-performance computing cluster "distributed computing", "Parallel Computing", by dedicated hardware and software, to integrate multiple servers CPU, memory and other resources, to achieve a large, only have the ability to supercomputers .

Load-balancing cluster of operating mode

Address Translation (NAT)

  • Referred to as the NAT mode, similar to the structure of the private network firewall, load balancer as a gateway for all server node, entrance as a client access, but also to respond to each node to access export client.
  • Private IP address of the server node, and a load balancer located in the same physical network security is better than the other two modes

IP tunnel TUN

  • TUN an open pattern network structure, only as a load balancer inlet accessed by a client, the respective nodes through their Internet, those connected directly respond to the client, rather than through the load balancer.
  • Internet server node dispersed in different locations, with an independent IP address of the public network, communicate with each other via a private IP tunnel load balancer.

Direct route DR

  • Direct route, semi-open network structure, and similar structure TUN mode, but each node is not dispersed throughout, but the scheduler is located in the same physical network.
  • The load balancer to each node a connection through local network does not need to establish a dedicated IP tunnel.

Load balancing cluster architecture

  • First layer: a scheduler load (Load Balancer)
  • Second layer: a pool of servers (Server Pool)
  • Third layer: shared memory (Share Storage)
    Here Insert Picture Description

LVS load scheduling algorithm (used)

LVS (Linux Virtual Server) virtual server

  • Polling (Round Robin)
    the received access requests in the order in turn assigned to each node in the cluster (real server), uniformly treat each server, regardless of the actual number of connections and the server system load.
  • WRR (Weighted Round Robin)
    access to the processing capability of the real distribution server in turn requests received, the query scheduler may automatically load each node and dynamically adjust its weight. This will ensure a strong server processing power to take on more traffic.
  • Minimum connection (Least Connection)
    is allocated according to the number of connections established real server, the access request received preferentially allocated to the least number of nodes connected. If all the server nodes similar properties, in this way better balance the load.
  • Weighted least connections (Weighted Least Connection)
    at a big difference in performance server node, the weights can be automatically adjusted to the real server, the node with higher weights will assume a greater proportion of active connections supported.

NFS Network File System

  • Depends on RPC (Remote Procedure Call)
  • You need to install the nfs-utils, rpcbind package
  • System Services: nfs, rpcbind
  • Shared configuration file: / etc / exports
Published 46 original articles · won praise 7 · views 1217

Guess you like

Origin blog.csdn.net/sinat_31854967/article/details/103978622