Detailed LVS load balancing cluster (theory section)

Enterprise Cluster Application Overview

Meaning cluster

  • Cluster, clusters, cluster
  • It consists of multiple hosts, but only outside the performance as a whole

In Internet applications, as the site for hardware performance, response time, service reliability, higher and higher data reliability requirements, a single server powerless

  • Solution
    • The use of expensive minicomputers, mainframes
    • Use common build server clusters

Enterprise Cluster Category

According to the target cluster for the difference can be divided into three types

  • Load-balancing clusters
  • High Availability Cluster
  • High Performance Computing Cluster

Load-balancing clusters (Load Balance Cluster)

  • The ability to increase the impact of the application of the system, as far as possible to handle more access requests, reduce latency as the goal, to achieve high concurrency, high-load (LB) overall performance
  • LB load distribution dependent on the primary node split algorithm

High availability cluster (High Availability Cluster)

  • Application systems to improve reliability, reduce downtime as much as possible for the target to ensure service continuity, achieve high availability (HA) fault tolerance effect
  • HA works includes a duplexer and a master-slave modes

High-performance computing clusters (High Performance Computer Cluster)

  • To improve the application system CPU speed, scalable hardware resources and analytical capacities, to obtain the equivalent of a large, high-performance supercomputer computing (HPC) capabilities
  • High performance is dependent on the high-performance computing cluster "distributed computing", "Parallel Computing", by dedicated hardware and software integrated CPU, memory, and other resources of the plurality of servers, achieve only a large computing capacity, only have the supercomputers

Load balancing cluster mode of analysis

Load balancing cluster is the company most used type of cluster

  • Workload scheduling technology cluster has three operating modes
    • Address Translation
    • IP tunnel
    • Direct Routing

NAT mode

  • NAT (Network Address Translation)
    • Referred to as the NAT mode, similar to the structure of the private network firewall, load balancer as a gateway for all server node, that is, as a client to access the entrance, as well as access nodes in response to 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 methods

TUN mode

  • IP tunneling (IP Tunnel)
    • Acronym TUN mode, an open network structure, only as a load balancer client access entry, each node connected to the Internet through a respective direct response to a client, rather than through the load balancer
    • Server node dispersed in different locations in the Internet, the public network having an independent IP address, communicate with each other via a private IP tunnel load balancer

DR mode

  • Direct routing (Direct Routing)
    • Acronym DR mode, semi-open network structure, and similar structure TUN mode, but each node is not dispersed throughout, but with a scheduler located in the same physical network
    • The load balancer to each node connected by a local network server, does not need to establish a dedicated IP tunnel

Load balancing cluster architecture

Structural load balancing

  • A first layer, a scheduler load (Load Balancer or Director)
  • The second layer, the server pool (Server Pool)
  • The third layer, shared memory (Share Storage)
    Detailed LVS load balancing cluster (theory section)

About LVS virtual server

Linux Virtual Server

  • Linux kernel for load balancing solution
  • In May 1998, created by Dr. Zhang Wen-song of our country
  • Official Website: http://www.linuxvirtualserver.org/

    [root@localhost ~]# modprobe ip_vs    //确认内核对LVS的支持
    [root@localhost ~]# cat /proc/net/ip_vs
    IP Virtual Server version 1.2.1 (size=4096)
    Prot LocalAddress:Port Scheduler Flags
    -> RemoteAddress:Port Forward Weight ActiveConn InActConn

    LVS load scheduling algorithm

  • Polling (Round Robin)
    • The access request received in turn in the order 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)
    • The processing capacity of real servers in turn allocate access requests received, the query scheduler may automatically load each node and dynamically adjusts its weight
    • Ensure strong server processing power to take on more traffic
  • Least Connection (Least Connections)
    • Allocated according to the number of connections the real server is established, access will receive priority in the allocation requests to the node with the fewest number of connections
  • Weighted least connections (Weighted L east Connections)

    • In the big difference in performance server node, the weights may be re-adjusted automatically real server
    • Higher weights node will assume a greater proportion of the activities connected load

    Use tools ipvsadm

    LVS cluster creation and management

  • Create a Virtual Server
  • Add, delete server node
  • View cluster and node case
  • Save the load allocation policy

Guess you like

Origin blog.51cto.com/14473285/2459140