scheduler scheduling-method
scheduling-method Algorithm for allocating TCP connections and UDP datagrams to real servers.
Scheduling algorithms are implemented as kernel modules.
Ten are shipped with the Linux Virtual Server:
rr - Robin Robin:
distributes jobs equally amongst the available real servers.
(리얼서버를 처음부터 차례로 선택해간다. 모든서버로 균등하게 처리가 분산)
wrr - Weighted Round Robin:
assigns jobs to real servers proportionally to there real servers’ weight.
Servers with higher weights receive new jobs first and get more jobs than servers with lower weights.
Servers with equal weights get an equal distribution of new jobs.
(rr 방식과 같지만 가중치를 추가해서 분산비율을 변경한다. 가중치가 큰 서버일수록 빈번하게
선택되므로 처리능력이 높은 서버는 가중치를 높게 설정하는것이 좋다.)
lc - Least-Connection:
assigns more jobs to real servers with fewer active jobs.
(접속수가 가장 적은 서버를 선택한다. 어떤 알고리즘을 사용하면 좋을지 모를 경우에 사용해도 좋다)
wlc - Weighted Least-Connection:
assigns more jobs to servers with fewer jobs and relative to the real servers’ weight (Ci/Wi).
This is the default.
(lc 와 같지만 가중치를 부여한다. 구체적으로는 [접속수+1/가중치]가 최소가 되는 서버를 선택하므로 고성능 서버는 가중치를 크게 하는것이 좋다)
lblc - Locality-Based Least-Connection:
assigns jobs destined for the same IP address to the same server if the server is not overloaded and available;
otherwise assign jobs to servers with fewer jobs, and keep it for future assignment.
(접속자수가 가중치로 지정한 값을 넘기 전까지는 동일한 서버를 선택하고 접속자수가 가중치를 넘어선 경우는 다른서버를 선택한다.
모든 서버의 접속수가 가중치로 지정한 값을 넘고 있을 경우 마지막에 선택된 서버가 계속 선택된다.)
lblcr - Locality-Based Least-Connection with Replication:
assigns jobs destined for the same IP address to the least-connection node in the server set for the IP address.
If all the node in the server set are over loaded, it picks up a node with fewer jobs in the cluster
and adds it in the sever set for the target.
If the server set has not been modified for the specified time, the most loaded node is removed
from the server set, in order to avoid high degree of replication.
(lblc 와 거의 같지만 모든 서버의 접속수가 가중치로 지정한 값을 넘고 있을 경우는 접속수가 가장 적은 서버가 선택된다.)
dh - Destination Hashing:
assigns jobs to servers through looking up a statically assigned hash table by their destination IP addresses.
(목적지 IP 주소로부터 해시값을 계산해서 분산대상 리얼서버를 선택한다.)
sh - Source Hashing:
assigns jobs to servers through looking up a statically assigned hash table by their source IP addresses.
(소스 IP 주소로부터 해시값을 계산해서 분산대상 리얼서버를 선택한다.)
sed - Shortest Expected Delay:
assigns an incoming job to the server with the shortest expected delay.
The expected delay that the job will experience is (Ci + 1) / Ui if sent to the ith server,
in which Ci is the number of jobs on the the ith server and Ui is the fixed service rate (weight) of the ith server.
(가장 응답속도가 빠른 서버를 선택한다. 그렇다고 해도 서버에 피킷을 날려 응답시간을 계측하는것은 아니고 상태가 established(active) 인 접속수가 가장 적은 서버를 선택하는 방식이다.
wlc와 거의 동일하게 동작하지만 wlc 에서는 established 이외의 상태인 접속수(time_wait, fin_wait)를 더하는 점이 다르다.
nq - Never Queue:
assigns an incoming job to an idle server if there is, instead of waiting for a fast one;
if all the servers are busy, it adopts the Shortest Expected Delay policy to assign the job.
(sed와 동일한 알고리즘이지만 active 접속수가 0인 서버를 최우선으로 선택한다.)