Introduction to the scheduling algorithm of LVS

Source: Internet
Author: User

1 overview

Ipvs Scheduler in LVs a total of Ten in the scheduling algorithm: Rr,wrr,lc,wlc,lblc,lblcr,dh,sh,sed,nq,

VS depending on the schedule, consider whether the RS The current load state is divided into two main categories: static and dynamic, in which the more complex the algorithm, the more efficient the server is (performance)

2 static Methods

static methods are only dispatched according to the algorithm itself, which is concerned with the starting point fairness. Relative to LVS , and does not care if rs can handle requests such as the load status of Rs.

There are 4 types of algorithms

RR : Roundrobin :

Polling , back end RS all requests are halved.

WRR : Weighted RR :

Weighted polling, assigning the number of requests based on weights

SH : Source Hashing :

session sticky ip address hash ip rs

However, this approach is more problematic, such as the source address is Nat after the public address, if the address corresponds to a lot of back-end machines, so the same IP access may be burdensome for the same server.

DH : Destination Hashing :

Destination Address hash, the request destined for the same destination address is always forwarded to the first selected RS , a typical usage scenario is load balancing in a forward proxy cache scenario, such as: Broadband operators

3 Dynamic Methods

The dynamics are mainly based on each RS the current load state and scheduling algorithm Overhead=value the smaller RS will be dispatched

dynamic scheduling is concerned with the final outcome, taking into account back-end servers RS the load Condition

There are 6 types of algorithms

LC : Least Connections

For raised here connection applications

Overhead=activeconns*256+inactiveconns

Active connection indicates that data is being transferred

An inactive connection indicates a connection was made, but no data was transmitted

WLC : Weighted LC :

WLC is the default scheduling method

Overhead= (Activeconns*256+inactiveconns)/weight

0. lc and wl 0 sed +1

SED : Shortest expection Delay :

Initial connection high weight first, overhead= (activeconns+1) *256/weight

NQ : never Queue :

the first round of uniform distribution, subsequent SED solves the problem of uneven distribution for the first time. So that all servers perform certain tasks.

LBLC : locality-based LC :

of Dynamic DH algorithm, usage scenario: Implementing a forward proxy based on the load state

LBLCR : LBLC with Replication :

with the copy function LBLC to resolve LBLC Load imbalance issues, from load-heavy replication to light-load RS


This article is from the "Sunshine Ops" blog, please be sure to keep this source http://ghbsunny.blog.51cto.com/7759574/1975009

Introduction to the scheduling algorithm of LVS

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.