Escolar Documentos
Profissional Documentos
Cultura Documentos
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 1
Abstract—This paper presents the performance characteristics of a non-content aware load balancing algorithm, ALBL, for
cluster-based web systems. Based on ALBL potential a new content aware load balancing algorithm is also introduced; called
ALBL/HSC. This algorithm maintains classes of HTTP traffic based on content of HTTP requests.Then it uses ALBL algorithm to
load balance requests per class accordingly. That is, ALBL/HSC maintains separate ALBL processes per HTTP service class
for balancing traffic among web servers assigned to each class.
Performance and scalability gains are shown from tests of ALBL against known balancing algorithms used by web-farms, such
as: Round Robin, Least Connections and Least Loaded. Then, ALBL/HSC algorithm is put to the test against ALBL over a
cluster based load balancing system. Moreover, CPU performance tests performed at the web switch and performance tests at
the web servers indicate both positive features and drawbacks of content aware ALBL/HSC and adaptive content blind ALBL.
This paper also presents new features that can be installed to content aware algorithms. That is, clustering prediction,
bandwidth and web farm utilization estimation and sharing mechanisms among classes of HTTP traffic.
Index Terms—Distributed web systems, load balancing, load balancing algorithms, web clusters.
—————————— ——————————
1 INTRODUCTION
Balancing systems that use layer 7 routing are mainly Shortest Expected Delay (SED) and Never Queue sched-
proxy servers or application gateway systems [3, 4, 5]. uling algorithms use similar approach to LC algorithm
Such systems redirect requests at application layer caus- and assign client connections to the web server with the
ing requests to traverse the entire protocol stack and thus shortest expected delay [18].
limit their performance potential as number of requests Stateless adaptive balancing algorithms take into ac-
increase. Usually such systems try to moderate degrada- count web server state metrics but do not keep track of
tion of cluster performance by limiting the number of connection state information. These algorithms use moni-
users that request service, or with the use of caching tech- tor agents running on either the web switch or web serv-
niques at the web switch. Other implementations of layer ers. The information retrieved from agent lookups is
7 routing use kernel space request dispatching techniques taken into account in order to determine balancing
instead of user space request dispatching at the web weights. Some commonly used metrics are: CPU load,
switch. Kernel dispatching mechanisms are: TCP splicing memory usage, disk usage, current process number and
[6, 7, 8], TCP handoff [9], TCP binding [10] and TCP re- ICMP request-reply time. An example policy algorithm
building, a TCP connection transfer mechanism [11]. In called CLBVM (Central Load Balancing for Virtual Ma-
conclusion, there is still lack of content management chines) is presented at [19]. In some other cases, web
mechanisms that shall enable efficient content request server metric values are stored by SNMP agents at the
routing. web servers and retrieved by the web switch SNMP man-
Layer 4 routing mechanisms redirect connections ager [20]. Another load balancing algorithm-protocol is
based on less sophisticated balancing algorithms, which the Openflow protocol that utilizes OpenFlow capable
are unaware of session or application layer attributes. switches and NOX controllers. Openflow uses a new al-
Routing mechanisms used in a non content aware web gorithm called LOBUS (LOad Balancing over UnStruc-
switch are the following: Distributed packet rewriting tured networks), presented at [21], that keeps track of sta-
(Direct Routing) [14], IP network address translation,
tistic information from Openflow capable switches in or-
Packet tunnelling and Link layer packet forwarding (also
der to allocate and commit network resources for each
referred to as MAC address translation) [15, 2].
web server in an unstructured web balancing network.
Adaptive algorithms weight calculation formulas are
2 L OAD BALANCING ALGORITHMS FOR CLUSTER based on augmentation of web server metric values fol-
BASED SYSTEMS lowed by normalization process. That is, a linear aggre-
We categorize load balancing algorithms used at a web gate in terms of summation of metric values load value
switch into five distinct categories: 1. Stateless non- as: Agg
n
= ∑ Ki ⋅ SM ik ,where: Agg load i , is
adaptive, 2. stateful non-adaptive, 3. stateless adaptive, 4. load i
i =1 Wi = W0 + 1 − n
stateful adaptive and 5. content aware. As stateful/stateless ∑
=1
Agg load i
length) for balancing decisions. System components that offer load predictions based
Stateless non-adaptive algorithms do not consider any on system (web server) resource metrics are called load
kind of system state information. Typical examples of trackers and systems that try to predict web servers be-
such algorithms are Random and Round Robin. Both haviour based on load tracker results are called load pre-
Random and Round Robin policies can be easily extent to dictors. Usually, both trackers and predictors do not op-
treat web servers of heterogeneous capacities that remain erate on the same system due to performance issues. Load
constant through time [15, 2, 1]. In addition, Weighted trackers are divided into: 1. Linear, such as simple mov-
Round Robin (WRR) can be used as a stateless balancing ing average trackers, as previously mentioned formu-
algorithm on web servers with different but known proc-
∑j M j
essing capacities. las: SMA( Sn(ti )) = , or exponential moving aver-
Stateful non-adaptive algorithms keep track of client n
connections at the web switch. Main representatives of age: EMA( Sn (ti )) = a ⋅ Sn + (1 − a ) ⋅ EMA( Sn (ti −1 )) , or simple
this category are Least Connections, Weighted Least moving median (SMA). Autoregressive models (AR) are
Connections (LC-WLC) algorithms [16, 17]. Moreover, also considered linear tracker functions, since they use
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 8, AUGUST 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 3
linear functions to calculate weights from metric values. Content aware load balancing algorithms are used both
AR model is a linear combination of the past k resource by layer-7 cache clusters and layer-4 web switches. Layer-
metric values represented as a vector. AR load tracker 7 switching was implemented in the kernel of operating
weight value over time is calculated as: systems (Linux layer-7 filtering [12, 13]), thus improving
AR( Sk (ti )) = a1 ⋅ St + ... + a k ⋅ St + e(t ) , where e(t) is a
i i − k −1
the overall performance of previous layer-7 balancing
distribution sequence of difference or deviation of metric algorithms. OS kernel layer 7 filtering capability lead to
values, called residuals sequence. In addition, ARIMA the development of new balancing algorithms based on
models (Autoregressive Integrated Moving Average) [24, packet content and routing based on priority service. Bal-
25] are obtained by the AR model and the moving aver- ancing algorithms based on layer-7 filtering analyze
age model as a linear combination of the past metric val- HTTP headers of requests from clients and adopt blind or
ues and q noise terms of the calculated metric values. cached dispatching policies [30, 31]. Characteristic exam-
Based on tracked data measurements over a time period, ples of content aware dispatching policies follow.
residual and differential measured data values are calcu- Workload Aware Request Distribution policy (WARD)
lated and weight value is predicted. 2. Non-linear load [32] assigns the most common HTTP requests to the same
trackers, such as cubic spline function and two sided server, while partitioning the rest of the requests to the
Quartile-Weighted Median (QWM) [24, 25] and previ- same web servers for the same types of requests. More-
ously mentioned linux local director weight calculation over, LARD (Locality Aware Request Distribution) im-
formula [22], can also be used by web servers for load proves cache hit rate in back end server by serving the
prediction and in some cases perform better than linear same requests to the same servers [33, 34], while Client-
trackers do (more responsive to load incidents). Accord- Aware Policy (CAP) tries to reach load balance by provid-
ing to [25], AR and ARIMA are inadequate to support ing multiple classes of service at the web switch [35].
run-time decision systems in cases of highly variable CWARD/CR, CWARD/FR [33] policies also take into ac-
work case scenarios. count web server workload and provide content based
Stateful adaptive algorithms use both adaptive algo- prioritized classification for HTTP requests.
rithm metrics and client flow state information such as: The combination of content-aware load balancing and
Number of connections or ratio of connections that a HTTP service classification was introduced to meet the
server has received to the average connections received at demands of complex HTTP requests that combine dy-
a specific time interval [23, 17], source or destination IP namic web pages, database transactions, multimedia and
address (locality aware based [26, 16]). The predictive real-time services. Such mechanisms provide more effi-
probabilistic load balancing algorithm (PPLB) uses adap- cient load balancing for web services not only per flow
tive weights based on a utility function that follows the but also per service request. LARD/RC, distributes re-
difference and deviation in predicted average and meas- quests based on a requests table incorporated at the web
switch, which assigns requests of the same type to one
ured web server response time: F ( S (t ), S ) and the avail-
cluster of web servers responsible for serving each re-
able processing capacity (remaining utilization capability quest type. It also uses a WLC scheduling policy for the
Ui of each web server: Wi = (1 − U i (t ) + F (t )) .PPLB algo- assignment of requests [36]. GCAP policy group’s re-
rithm then uses a scheduling policy called Probabilistic quests based on CAP (Content aware request distribution
Preferred Short Job (PPSJ) that uses several classes of web policies) and then assigns in a WRR fashion requests of
traffic at the web switch. This policy gives precedence to the same CAP class for each web server [36]. Moreover
HTTP requests that belong to a class with relatively PPLB algorithm classifies web requests into different
shorter service time and a large number of requests in its classes based on their service demands for resources at
queue waiting for service [27]. Other stateful adaptive the web server [27].
implementations include MALD, which uses agents that
instantiate at the web server, in order to inform the sys- 3 PROPOSED ALGORITHMS
tem about the web-server's load based on an index that
We designed and implemented a stateful adaptive load
takes web switch connections per web server into account
balancing algorithm, called Adopt Load BaLancer (ALBL).
[28]. Finally, simulated annealing load balancing algo-
ALBL tries to predict congestive network conditions and
rithm (SA), uses an energy function that scores each one
web server load incidents in order to perform its balanc-
web server based on the following metrics: request rate,
ing decisions. Preliminary versions of the algorithm were
request processing rate, web server processing capability
presented at [37, 38] We also present a new content aware
and average waiting time of each request in the web
load balancing algorithm ALBL/HSC (Adopt Load BaL-
server queue. This algorithm also uses penalty thresholds
ancer with Hierarchical Service Classes) that maintains a
and penalty drops [29].
classification discipline per HTTP service type. Then it
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 2, FEBRUARY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 4
uses ALBL algorithm for balancing HTTP requests per Agents responsible for network delay calculate the re-
service class. sponse time between TCP SYN request and SYN|ACK
reply (TCP half connection). This time difference is an
3.1 ALBL Algorithm
approximation of propagation and queuing delay at the
ALBL algorithm uses agents that probe web servers of a
network path between the web switch and the web
web server farm periodically. Metric values derived from server. Network delay metric is a good approximation of
this probing process are used for weight calculation and network delay of a small size packet that traverses the
therefore for balancing decisions at the web switch. We
network path from the web switch to the web server, if
implemented a cluster based web system that uses Linux the web server is not overloaded. That is:
netfiler kernel api [13] for marking and routing client
Ndelay = QPr op + Qn = RTTi , where RTTi is the round trip
HTTP requests to a pool of web servers. A Linux kernel
WRR scheduler uses the calculated weights in order to time of SYN-SYN|ACK PDU. An appropriate probing
forward forthcoming requests at the web switch, using timeout is set for SYN queuing. The timeout value can be
Direct Routing or NAT to the selected web server. Then modified according to network topology and the maxi-
the web server responds to the request and communicates mum expected latency of the system. If timeout occurs
directly to the client (Direct Routing case) or via web- then that web server is removed from the balancing proc-
switch (NAT case). Direct Routing capability was imple- ess until the next balancing period Tp.
mented in the latest version of our algorithm, that until In order to discriminate among web server CPU load
recently supported only NAT routing capabilities (the and network congestion incidents, a more of a static
whole HTTP flow passed through the web switch). We threshold value is used by the algorithm as follows: If at
also altered the algorithm's behavior towards HTTP flows least one web server has HTTP response time
that are under service. Such flows are marked as “ser- ( HTTPresp ) less than the fixed threshold value, the algo-
i
viced flows” and are extracted from the forwarding proc- rithm concludes that this is due to transient web server
ess to another web server, if the selected balancing web load and network congestion incidents are set to be of less
server changes. significance. So weight calculation is performed using the
Two metrics are used by ALBL agents to adjust web product of HTTP response time ( HTTPresp ) with net-
server weights.These metrics are: HTTP response time and i
network delay metric. Metric values are periodically up- work delay metric ( ndelayi ), as in (1), where ki is a pa-
dated at a predefined interval period Tp by agents. HTTP rameter that depends on the requested object size over
response time metric is calculated as follows: The web network MSS value. If network delay metric value is
switch sends an HTTP request for a predefined object or smaller than HTTP response time metric value, (1) does
process to each one of the web servers and waits for a not provide adequate responsiveness towards network
reply. Then calculation of the time that the request was congestion incidents, but can fairly estimate
sent and the time that the web server FINs the request web server load status.
occurs. The time difference between request and FIN re- 1
ply is equal to the metric value. HTTP response time met- HTTPrespi ⋅ ndelayi
Wi = n
ric is equal to the sum of network propagation delay, 1
network queuing delay and web server processing delay. ∑
i =1 HTTPresp i − ki ⋅ ndelayi
That is: HTTPresp = QPr op + Qn + QPr oc , where propaga- (1)
tion delay QPr op follows the assumption that is the equal If all web servers have HTTP response time metric
value greater than threshold value, then the algorithm
for all web servers, queuing delay: Qn is the sum of all assumes that such bottleneck is mainly caused by net-
the delays encountered by a packet from the time of its work congestion incidents due to burst client requests
insertion into the network until the delivery to its destina- followed by persistent load occurrences at the web server.
tion and processing delay: QPr oc , is the time needed for a So a more sensitive approach to RTT variations, a non
linear (exponential) approach is used for weight calcula-
web server scheduled thread to process a request and
tion (use of (2)).
construct an appropriate reply message. Processing delay
1
depends on web server CPU load index and web service ndelayi2 ⋅ ( HTTPrespi − li ⋅ ndelayi )
response capability. Wi = n
1
Network delay metric calculation is achieved by a ∑
=1
i ndelay 2
⋅ ( HTTPrespi − li ⋅ ndelayi )
i
minimum size TCP SYN packet constructed at the web (2)
switch with source the IP address of the web switch and As we can spot from (2), the processing delay metric for
destination the IP address of each one of the web servers.
each web server is estimated by the subtraction of li
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 8, AUGUST 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 5
times the network delay metric from the HTTP response services that require secure communication channels,
time metric, where li is the number of packets transmit- video on demand, file transfer services, gaming, confer-
ence broadcast services, informatory services (blogs, fo-
ted and received by the HTTP response time agent (for
rums, wikis, rings, etc) and other types of service.
downloading a specific object from the web server). Then
HTTP traffic pattern is based on a request-reply
the product of the processing delay metric to the network
mechanism, where the request is usually a small packet
delay metric is used for weight calculation. The weight
no more than 512 bytes and the reply is a set of PUSH
value derived from (2) increases exponentially propor-
packets that its size depends on the web service that is
tional to the network delay deviation and can spot con-
requested (multimedia data, file transfer, news HTML
gestion incidents, because web server processing time
report, script that executes either on client or server). Ac-
metric values ( TPr ), are closer to the network delay met-
i knowledgments follow after the PUSH TCP packets at the
ric values than the HTTP response time metric values are end of the reply (if the reply is of 2RTO time or at k RTT
(close to real processing time). That indicates that (2) is time intervals). There is of course the case of burst UDP
more responsive for conditions where a web server has packet ACK replies (for multimedia type of traffic). In
less computational load than link network delays or link conclusion, response time for small size HTTP packets are
network delays forebode persistent load incidents at the constrained by TCP slow start mechanism and large
end nodes. packets and thus present bigger throughput deviation
Concluding, (1) does not provide adequate respon- (RTT deviation), while large TCP packets are favoured
siveness towards network conditions, but can fairly esti- more by TCP congestion avoidance mechanism and
mate load conditions. Alternatively, from (2), a processing achieve much more constant throughput (smaller RTT
delay metric value for each web server request is ex- deviations as packet size increases)[39].
tracted from the HTTP response time metric. The product Distinct patterns of web services utilization efforts
of the processing delay metric to the square of the net- (CPU-memory or BW resources), lead to the demand of
work delay metric is more responsive to network delay web services classification, performed either at the end-
variations and can spot congestion incidents. ALBL algo- point web server or by the intermediate routers. Web ser-
rithm smoothness or responsiveness is proportional to the vices classification attempts are presented in [35, 40, 27,
periodic probing frequency Tp. If Tp ≤ 2 ⋅ Tg (50ms 30] with formalised categories such as web publishing
(static and lightly dynamic services), web transaction
≤ Tg ≤ 100ms, is web-switch clock granularity), then (disk bounded services), web commerce and web multi-
web-switch computational effort increases dramatically media services. Another web service classification at-
while if Tp ≥ 20 ⋅ Tg , then ALBL cannot spot or compen- tempt is also presented in [41], as issuance, affair, dy-
sate for short duration congestion or load incidents. namic security and multimedia types of service.
Taking into account the previous web service catego-
3.2 ALBL/HSC Algorithm ries, we take the assumptions one step further; In order to
ALBL/HSC algorithm is a content aware extension of the preserve and cope with the distinct characteristics of web
adaptive ALBL algorithm. This algorithm includes sepa- services such as real-time interactive and multimedia, to
rate ALBL algorithm processes into five classes of HTTP provide a separate channel for web cryptographic ser-
requests of different service type as mentioned in section vices (close to an anonymous channel) and by taking into
3.3. Classes maintained by ALBL/HSC include the follow- consideration the aforementioned studies, ALBL/HSC
ing: Class 1: static and lightly dynamic HTTP traffic disciplines HTTP traffic into the following categories
(Normal HTTP traffic), class 2: NCQ HTTP traffic, class 3: (service classes):
Max throughput HTTP traffic, class 4: Multimedia traffic Normal HTTP Traffic: This type of traffic is provided
and class 5: SSL traffic. HTTP requests are classified into either by (a) static or (b) light dynamic content informa-
each one of the previous classes based on HTTP request tion, requested by clients. Discrimination among static
URI extension (for multimedia traffic, normal traffic), and dynamic content that may consume web server re-
HTTP reply content length (NCQ traffic, max throughput sources are left to web server metrics. Dynamic content
traffic) and request protocol (SSL traffic). A short analysis data may over-utilize web server resources more than
of the classification and discipline methodology used per static content data, but both categories (a) and (b) present
HTTP service class follows. similar characteristics from the network's point of view,
but not for the web server. Further classification may be
3.3 ALBL/HSC service classes
required and is set as a future study.
Web services maintain different characteristics in terms of Non Congestive Real-time traffic: This type of traffic
bandwidth usage and web server utilization. Web ser-
includes flows that use small packets in terms of size,
vices include real-time, interactive, multimedia services,
whose priority is predetermined by a static NCQ thresh-
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 2, FEBRUARY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 6
with specified by the administrator max latency value where i=1..4 (4 service classes), NDPi the Network Delay
and higher priority that the entire GRED discipline. That Product value per class, Thri , Thri current and average
is, the bandwidth delay product of SSL traffic is assured
throughput for each class and Ci the number of active
by provisions made by network administrators. In order
connections sustained currently by each class. b = 2 a , is a
to initialize each one of the remaining four classes, some 3
parameters need to be set by the network administrator coefficient parameter for the CBD metric value calcula-
that correspond to the % expected bandwidth share (% tion. Based on CBD metric value HTTP flows that belong
BW, fraction of the link bandwidth-BW) that each class to class 1-4 may fall into each one of the class probabilistic
utilizes and the maximum desired latency that a flow drop phases according to the following criteria:
may suffer passing through each class. These values need 1. Fall to probabilistic drop of AFx1, if qave is below
to be set by the administrator so that the min thresshold and or exceeds min thresshold and CBD value is less
max thresshold values can be calculated from equations (3) 1
than: 3 ⋅ % BWshare ⋅ BW
⋅ min(latency, ndelay )
and (4) [49, 45, 50]: Ci i
from HTTP traffic that traverses through the web switch. Group Drop Class/ Drop DSCP
For each one of the 4 classes we have three levels of Class Probability
drop precedence (See Table 1). Initially all incoming con- AF1 1/0.02 0x28
nections for a specific class enter via the first level of drop AF1 2/0.03 0x30
precedence. Then for each class based on ALBL algorithm AF1 3/0.07 0x38
metric values an additional exponential weighted moving AF2 1/0.005 0x48
average (EWMA) is calculated of network delay metric AF2 2/0.01 0x50
values for all web servers belonging to a class using the AF2 3/0.015 0x58
following equation: AF3 1/0.01 0x68
n
1 AF3 2/0.15 0x70
NDP = a ⋅ max(ndelayi ) + (1 − a ) ⋅
n
∑
=1
i
ndelayi
AF3 3/0.02 0x78
(5) AF4 1/0.01 0x88
where i=1..n is the number of web servers assigned to AF4 2/0.02 0x90
each service class. This weight value is called Network AF4 3/0.03 0x98
Delay Product (NDP) of all web servers in one class, a pa- EF 0 0xb8
rameter is based on network delay measurements value min thresshold CBD value is more
and is set from experimental results to a value of a=0.2. If 2
than: ⋅ % BWshare ⋅ BW
responsiveness towards transient network delays that 3 ⋅ min(latency, ndelay )
packets suffer traversing the network (network with loosy
i
Ci
links) needs to be increased, then this value is better set to
a=0.7. Based on the number of active connections for each
3.5 ALBL/HSC prediction of scalability and BW
class at the web switch, ALBL/HSC algorithm calculates sharing
the active Class Bandwidth Delay (CBD) product metric ALBL/HSC algorithm has also the capability to predict
value per each class (See Eq. (6)).
scalability enhancements for each class based on the aver-
age connections per class and expected bandwidth share
Thri Thri increase or decrease for each class (these mechanisms
CBDi = Ci (b + (1 − b) ) ⋅ NDPi were not adapted into GRED but left as prediction met-
Ci Ci
rics for the administrator. Their adaptation is considered
(6)
future work). We describe these prediction mechanisms
separately at the following sections.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 2, FEBRUARY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 8
3.5.1 ALBL/HSC scalability scalability prediction M/M/m system can be calculated as waiting time in the queue
We compare scalability of an M/M/1 queuing system of 1 in terms of an M/M/1 system as follows:
web server with an M/M/m system of m web servers.
Wq ⋅ ρ
Both systems use FIFO queues, utilize open queuing net- Wq ' = D (ρ )
works with random inter-arrival and service times (fol- ρ 2 + Wq (m − 1) m (8)
low non heavy tailed exponential distribution). We de-
From (8) it is obvious that as the number of web serv-
note as λ, λ’ and μ, μ’ average inter-arrival and service
ers’ increases in a cluster based web system (meaning
rates for M/M/1 and M/M/m systems accordingly, of infi-
scalability increase), waiting time in the queue of such
nite queuing length. Poisson process and exponential
system decreases in comparison to a single web server
distribution is assumed and usually used for simulation
system. What is also obvious from (8) is that HTTP wait-
of request and servicing rates of HTTP traffic (Moreover,
ing time in the queue of an M/M/m system is also highly
also more exponential heavy tailed distributions imprint
dependable on system utilization factor ρ. Meaning as the
more efficiently HTTP traffic characteristics and may be
utilization of such a system decreases we may achieve the
applicable). This is the case for HTTP traffic created from
same waiting times for HTTP requests with fewer web
independent sessions that correspond to bursty flows
servers m and as utilization increases we can keep con-
with large request spacing inside a session (inter-flow
stant waiting times by increasing the number of web
interval)[39]. For the M/M/1 system we have the follow-
servers the system utilizes accordingly. This is in fact true
ing: N = ρ and W = ρ , where Nq is the number of
q
1− ρ
q
µ (1 − ρ )
for a highly scalable balancing algorithm that can scale up
to a large number of web servers without adding signifi-
requests in the queue, Wq is the mean response time in
cant performance drawbacks to the whole system.
the queue and ρ =
λ
= 1 − p0 , is the utilization fraction of
µ Now let us assume that all m web servers of an
time the server is busy. Additionally, for the M/M/m sys- M/M/1 are fully busy with a factor Dm ( ρ ) → 1, Dm ( ρ ) = 0.999
tem we have: N 'q = Dm ( ρ ) ⋅ ρ' , where and f = 1 , we have: fq λ2 + µ 2 (m − 1) .That leads us to
m − ρ' q
Wq
fq ' = 0.999 ⋅
µ ⋅λ
Dm ( ρ ) =
ρm m
p
the all servers not available probability the following equation:
m! m − ρ 0
ρ' 1
and W ' = D ( ρ ) . m = 1 + fq ⋅ ρ 2 ( − 1), ρ ≤ 1
q m
λ ' (m − ρ ' ) ρ (9)
We make the following assumption that for both load From (9), it is obvious that there is a correlation between
balancing systems of 1 and m web servers, the request scalability of a multi-server system with the queue wait-
and service rates follow Poisson process distributions and
ing frequency fq of an M/M/1 system and parameter ρ.
converge to the same average rate values: λ=λ’and μ=μ’.
Based on this assumption, for the M/M/1 and M/M/m That is, scalability on an M/M/m system depends on cli-
queuing systems we see that there is a relationship be- ents request rate and servers response rate. Both request
tween the number of servicing web servers in a cluster and response rates can be calculated at the web-switch.
based web system and the rate of incoming HTTP re- Prediction of an increase or decrease in scalability per
quests at the web switch. That is, depending on the num- class of HTTP service is based on (9) (Scalability predic-
ber and rate of incoming requests scalability of a cluster tion equation. According to (9), the minimum number of
based system must converge to a specific number of web web servers needed to service requests for a class, which
server availability. In other words, if the HTTP request arrive at the web switch at a rate λ and receive service at a
rate decreases then clusters scaled up to a large number of λ
rate μ can be predicted, if we calculate . Our prediction
nodes (highly scalable) are not the best balancing solu- µ
Wq
tion in terms of performance. If we set as Ck = , then mechanism uses a λ calculated as λ = Cactive , where
ρ dt
ρ and C ' = ρ . There is a rela- Cactive the number of active connections for each class
Ck =
λ (1 − ρ )
k
λ (1 − ρ ) + λ (m − 1) CTime _ wait
and as µ = , the number of active connections
tionship between Ck and Ck ' : dt
1 1 λ (m − 1) that are left to TCP TIME_WAIT status. Based on the fol-
− = lowing equations and if λ ≤ µ , then from (9) we can
Ck ' Ck ρ
calculate the number of minimum web servers needed to
(7) deliver efficiently HTTP requests and the deviation pa-
From (7) we conclude that waiting time in the queue for an
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 8, AUGUST 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 9
In experimental scenarios I and II we investigate per- sive behavior pinpoints ALBLND aggressive characteris-
formance and scalability of the following balancing algo- tics towards network congestion or web server load
rithms: Round Robin (RR), Least Connections (LC) and change. While the aforementioned algorithms do not
Least Loaded (LL). Then we compare these results with have the sensitivity to detect network link changes and if
measurements of ALBL implementation. In experimental they do detect a load change may use conservative
scenario III, we investigate performance of ALBL/HSC mechanisms to mediate the problem (send one one re-
and ALBL, while also putting to the test CPU processing
efforts set by both algorithms at the web switch.
This is proof that ALBLND matches successfully con- 4.2 ALBL scalability scenario II
gestion incidents at the first web server, due to its high
responsiveness towards changes in link network delay or In this scenario we put to the test LC, LLoad, ALBL (use
the web servers processing time of a request. This respon- of (1)) and ALBLND (use of (2)) algorithms scalability
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 8, AUGUST 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 11
with the use of the SF metric. In order to calculate SF val- 4.3 ALBL/HSC performance scenario III
ues we retrieve a 10Kb object from the web cluster. This
operation is performed at rates that escalate from 20 In this scenario we examine performance of ALBL over
HTTP till 400 HTTP requests per second using two web ALBL/HSC in a cluster based environment of 4 web serv-
servers behind the web switch and 1Kb object requests. ers where half the clients request a static HTTP content of
Then we change the number of web servers at the web NCQ size (200-250Bytes random size object), while the
cluster from 2 to 5 and repeat the whole experiment. The other half of the clients request HTTP content is of max
web servers used are of equivalent processing power and throughput size (download a large file over HTTP of
not loaded. 100MB size). This operation is performed at rates that
SF metric shows the percentage of throughput gain of escalate from 40 to 400 HTTP requests per second (20
the average throughput achieved by the previous algo- req/s for the first class and 20 for the second until 200
rithms, if we increase the number of web servers in the req/s for the first class and 200 for the second). This con-
web farm from 2 to 5. As we can see in Fig. 3, LC algo- tention increase mechanism ends when a total number of
rithm presents the highest throughput gain as we scale 24,000 HTTP requests have been successfully delivered
from 2 to 5 web servers. Adaptive algorithms like LLoad service. Firstly, we perform the test by using ALBL algo-
and ALBLND follow with an average difference of 0.08% rithm weight calculation derived from (1). Then we per-
from LC algorithm. Finally, ALBL presents the worst form the same experiment using ALBL/HSC and assign 2
scalability factor that averages nearly 0.31% less than the web servers for servicing the NCQ class and 2 web serv-
SF value of LC algorithm. ers for servicing the Max throughput class. We also send
LC best scalability is due to the algorithms fast deci- packets arriving for other classes to the Max throughput
sions at the web switch that do not depend on complex class. We adjusted expected BW parameter for both NCQ
calculations or feedback information from the web serv- and Max throughput classes to ½ BW of the available link
ers. As the number of web server nodes increase, LLoad BW (100Mbit/s). That is, 6250 Kb/s and the maximum ex-
algorithm depends on more feedback load information pected latency for each class based on a MTU package
from web servers. Increasing probing frequency of LLoad length for the Max throughput class to 0.3ms. Accord-
leads its SF performance near the performance line of LC, ingly, we maintain an average 250Bytes packet size for
but still cannot outperform it. ALBLND algorithm (that the NCQ class and latency of 0.05ms. Because ACK pack-
use equation (2) for the WC process) is also out-scaled by ets due to their small size, affect ALBL/HSC performance
LC due to algorithm agent performance at the web we pass ACKs to both classes (ACKs to a Max throughput
packet via the Max throughput class, while ACKs for an
NCQ packet via the NCQ class).
switch. As probing agent frequency and responsiveness We calculate the average response time per aggregated
decrease, ALBL algorithm scaling performance decreases bunch of requests of ALBL and ALBL/HSC algorithms.
to a maximum value of 0.5% of that of LC algorithm scal- That is, for NCQ and Max Throughput HTTP classes. At
ing performance. This is of course the case of a balancing Fig. 4 ALBL/HSC NCQ class has less response time than
system where all network links are of equivalent network the NCQ traffic of the classless ALBL algorithm. This is of
capacities and all web servers have equal loads. course not the case for the ALBL/HSC Max throughput
class, which increases its average response time over the
Max throughput class of the ALBL algorithm. This can be
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 2, FEBRUARY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 12
explained by the functionality of the class mechanism of ALBL, 280-400 req/sec) proportional to the increase of
ALBL/HSC that favors small NCQ HTTP flows and limits request rate. This causes request rate to be a more critical
burstiness and aggressiveness of larger packet size HTTP factor for the web switch forwarding capability than the
flows by setting an extra queuing delay to those packets number of maintained connections. The paradox in this
via the GRED mechanism (packet drops/ TCP retransmis- case is that ALBL/HSC algorithm presents a more of loga-
sion and resetting of the TCP window size). rithmic increase in CPU processing power over request
rate. The only conclusion that can be clearly drawn by Fig
6., is that content aware algorithms with classes of service
need at least 60-200% more CPU processing effort than
adaptive content blind algorithms that use probing agents
or number of connections to balance accordingly among a
number of web servers. The profit of such performance
We also present ALBL/HSC, a content aware balancing [6] D. Maltz and P. Bhagwat, “TCP splice application
algorithm that uses ALBL mechanism for the balancing layer proxy performance,” High Speed Networks, vol. 8, no. 3,
process among web servers that service requests for the pp. 225 – 240, 1999.
same service class. ALBL/HSC algorithm is capable of [7] S. Adhya, “Asymmetric TCP Splice: A Kernel Me-
differentiating HTTP requests into service classes and chanism to Increase the Flexibility of TCP Splice, Master The-
provides different drop probabilities for each class based sis,” http://www.cse.iitk.ac.in/research/mtech1999/-
on NDP and CBD metric values. It also has the ability to 9911134.ps.gz, 2001.
predict the need of scalability or bandwidth in- [8] S. Purkayastha, “Symmetric TCP Splice: A Kernel
crease/decrease per service class. Incorporation of predic- Mechanism for High Performance Relaying,” Dept. of C.S.
tion metrics to the algorithm is considered as future work. Indian Institute of Technology, Tech. Rep., 2001. [Online].
We compare performance of ALBL algorithm against Available: http://www.cse.iitk.ac.in/research/mtech1999/-
known stateless, stateful and adaptive algorithms and 9911140.ps.gz
performance of ALBL/HSC over ALBL. From the experi- [9] L. Wang, “Design and Implementation of TCPHA -
mental results we show that ALBL matches or even over- Draft release,” http://dragon.linux-vs.org/dragonfly/, 2005.
comes the performance of conventional balancing algo- [10] M.-Y. Luo and C.-S. Yang, “Efficient support for con-
rithms. In particular, ALBL balances efficiently HTTP tent-based routing in web server clusters,” in Proc. of 2nd
traffic on unbalanced conditions that dynamically change: USENIX Symposium on Internet Technologies and Systems, 1998.
(a) Due to utilized network conditions and (b) due to web [11] H.-H. Liu, M.-L. Chiang, and M.-C. Wu, “Efficient
server limited computational resources, while adequate support for content-aware request distribution and persistent
network resources exist. We also confirm ALBL algorithm connection in web clusters,” Software Practise & Experience,
scalability potential (used as a base balancing algorithm vol. 37, no. 11, pp. 1215 – 1241, 2007.
by ALBL/HSC). [12] Layer7filter, “Linux Layer7 filter Team: Application
Finally, we show with performance measurements of Layer Packet Classifier for Linux,” http://l7-
ALBL/HSC over ALBL, the significant performance gains filter.sourceforge.net/, 2004.
of content aware balancing strategies over non content [13] Netfilter, “Linux Netfilter Project,” http://-
aware ones, as well as the processing efforts at the web www.netfilter.org, 2000.
switch that emerge. Further reduction of ALBL/HSC [14] L. Aversa and A. Bestavros, “Load Balancing a Clus-
processing overhead at the web switch and incorporation ter of Web servers using Distributed Packet Rewriting,” in
of bandwidth and scalability estimation process metrics Proc. of IEEE International Performance, Computing and Commu-
into ALBL/HSC, is set for investigation and future work. nications conference, 2000, pp. 24–29.
[15] M. Colajanni, P. S. Yu, and D. M. Dias, “Analysis of
ACKNOWLEDGMENT task assignment policies in scalable distributed Web-server
We would like to thank Democritus University of Thrace systems,” IEEE Trans. on Parallel and Distributed Systems, vol. 9,
Dept. of Electrical and Computer Eng., Data analysis pp. 585–600, 1998.
laboratory for the permit to use their laboratory equip- [16] CISCO, “CISCO Services Modules - Understanding
ment to perform our tests. We also would like to thank CSM Load Balancing Algorithms,” http://www.cisco.com/-
Elec. Eng. Panagiotis Nestoras (pnestora at ee.duth.gr) for warp/public/117/csm/lb_algorithms.pdf, 2007.
his technical advice and assistance at the conduct of the [17] W. Zhang, “Build highly-scalable and highly-
experimental scenarios. available network services at low cost,” Linux Magazine, vol. 3,
pp. 23–31, 2003.
REFERENCES [18] A. Weinrib and S. Shenker, “Greed is not enough:
[1] V. Cardellini, E. Casalicchio, M. Colajanni, and P. S. Adaptive load sharing in large heterogeneous systems,” in
Yu, “The State of the Art in Locally Distributed Web-Server Proc. of IEEE INFOCOM, 1988, pp. 986–994.
Systems,” ACM Computing Surveys, vol. 34, no. 2, pp. 263–311, [19] B. Abhay and C. Sanjay, “Performance evaluation of
2002. web servers using central load balancing policy over virtual
[2] V. Cardellini, M. Colajanni, and P. S. Yu, “Dynamic machines on cloud,” in Proc. of COMPUTE: The Third Annual
load balancing on web server systems,” IEEE Internet Compu- ACM Bangalore Conference. New York, NY, USA: ACM, 2010,
ting, vol. 3, no. 3, pp. 28–39, 1999. pp. 1–4.
[3] CISCO, “Distributed Director,” http://- [20] J. Batheja and M. Parashar, “A framework for Adap-
www.cisco.com/warp/public/cc/pd/cxsr/dd/, 2004. tive Cluster Computing Using Javaspaces,” Cluster Computing,
[4] SQUID, “web proxy cache,” http://www.squid- vol. 6-3, no. 3, pp. 201–213, 2003.
cache.org, 1995. [21] N. Handigol, S. Seetharaman, N. McKeown, and
[5] D. Wessels and K. Claffy, “Internet Cache Protocol R. Johari, “Plug-n-serve: Load-Balancing Web Traffic using
(ICP) version 2,” RFC 2186, 1997. OpenFlow,” in Proc. of ACM SIGCOMM, 2009, pp. 88–95.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 2, FEBRUARY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 14
[22] D. Maltz and P. Bhagwat, “Linux Director: a connec- [35] E. Casalicchio and Colajanni, “A Client-Aware Dis-
tion director fo scalable network services,” Computer Science patching Algorithm for Web Clusters providing multiple ser-
and Technology, vol. 15, no. 6, pp. 560 – 571, 2000. vices,” in In proc. of the 10th WWW conference, 2002.
[23] P. O’Rourke and M. Keefe, “Performance Evaluation [36] M.-L. Chiang, C.-H. Wu, Y.-J. Liao, and Y.-F. Chen,
of Linux Virtual Server,” in Proc. of the 15th LISA System Ad- “New content-aware request distribution policies in web clus-
ministration Conference, 2001, pp. 79–92. ters providing multiple services,” in Proc. of the 2009 ACM
[24] M. Andreolini and S. Casolari, “Load prediction symposium on Applied Computing. ACM, 2009, pp. 79–83.
models in web-based systems,” in Proc. of the 1st international [37] A. Karakos, D. Patsas, A. Bornea, and
conference on Performance evaluation methodolgies and tools. S. Kontogiannis, “Balancing HTTP traffic using dynamically
ACM, 2006, p. 27. updated weights, an implementation approach,” in Proc. of the
[25] M. Andreolini, S. Casolari, and M. Colajanni, “Mod- 10th Panhellenic Conference on Informatics, 2005, pp. 873–878.
els and Framework for Supporting Runtime Decisions in [38] S. Kontogiannis, S. Valsamidis, P. Efraimidis, and
Web-Based Systems,” ACM Transactions on the Web., vol. 2, A. Karakos, “Probing based load balancing fo web server
no. 3, pp. 17–43, 2008. farms,” in Proc. of the 13th Panhellenic Conference on Informatics,
[26] V. Cardellini, M. Colajanni, and P. S. Yu, “Geograph- 2009, pp. 175–180.
ic load balancing for scalable distributed Web systems,” in [39] S. B. Fred, T. Bonald, A. Proutiere, G. Régnié, and
Proc. of the 8th International Symposium on Modeling, Analysis J. W. Roberts, “Statistical bandwidth sharing: a study of con-
and Simulation of Computer and Telecommunication Systems, gestion at flow level,” ACM SIGCOMM Comput. Commun.
2000, pp. 20–28. Rev., vol. 31, no. 4, pp. 111–122, 2001.
[27] S. Sharifian, S. Motamedi, and M. Akbari, “A predic- [40] M. Andreolini, E. Casalicchio, M. Colajanni, and
tive and probabilistic load-balancing algorithm for cluster- M. Mambelli, “A Cluster-Based Web System Providing Diffe-
based web servers,” Applied Soft Computing, vol. 5, no. 1, pp. rentiated and Guaranteed Services,” Cluster Computing, vol. 7,
174–186, 2010. no. 1, pp. 7–19, 2004.
[28] J. Cao, Y. Sun, X. Wang, and S. K. Das, “Scalable load [41] Z. Lin, L. Xiao-ping, and S. Yuan, “A content-based
balancing on distributed web servers using mobile agents,” Dynamic Load-Balancing Algorithm for Heterogeneous Web
Parallel and Distributed Computing, vol. 63, no. 10, pp. 996–1005, Server Cluster,” Computer Science and Information Systems,
2003. vol. 7, no. 1, pp. 153 – 162, 2010.
[29] B. Boone, S. Van Hoecke, G. Van Seghbroeck, [42] L. Mamatas and V. Tsaoussidis, “A new approach to
N. Joncheere, V. Jonckers, F. De Turck, C. Develder, and Service Differentiation: Non-Congestive Queueing,” in Proc. of
B. Dhoedt, “Salsa: QoS-aware load balancing for autonomous International Workshop on Convergence of Heterogeneous Wireless
service brokering,” Systems & Software., vol. 83, no. 3, pp. 446– Networks, 2005, pp. 78–83.
456, 2010. [43] L. Mamatas and V. Tsaoussidis, “Differentiating Ser-
[30] E. Casalicchio and M. Colajanni, “A client-aware vices with Non-Congestive Queuing (NCQ),” IEEE Transac-
dispatching algorithm for web clusters providing multiple tions on Computers, vol. 58, no. 5, pp. 591 – 604, 2009.
services,” in Proc. of the 10th international conference on World [44] TC, “Linux Traffic Control Project,” http://lartc.org/,
Wide Web. ACM, 2001, pp. 535–544. 2001.
[31] M.-Y. Luo, C.-S. Yang, and C.-W. Tseng, “Content [45] W. Almesberger, J. H. Salim, and A. Kuznetsov,
management on server farm with Layer-7 routing,” in Proc. of “Generalized Random Early Drop queueing discipline,”
ACM symposium on Applied Computing. ACM, 2002, pp. 1134– http://http://www.opalsoft.net, 2006.
1139. [46] S. Floyd and V. Jacobson, “Random early detection
[32] L. Cherkasova and M. Karlsson, “Scalable Web Serv- gateways for congestion avoidance,” IEEE ACM Transactions
er Cluster Design with Workload-Aware Request Distribution on Networks, vol. 1, no. 4, pp. 397–413, 1993.
Strategy WARD,” in Proc. of the 3rd International Workshop on [47] M. Christiansen, K. Jeffay, D. Ott, and S. F. Donelson,
Advanced issues of E-Commerce and Web-Based Information Sys- “Tuning RED for Web Traffic,” in Proc. of ACM SIGCOMM,
tems. Society Press, 2001, pp. 212–221. 2000, pp. 139–150.
[33] M.-L. Chiang, Y.-C. Lin, and L.-F. Guo, “Design and [48] B. Hubert, G. Maxwell, R. Van Mook,
implementation of an efficient web cluster with content-based M. Van Oosterhout, P. Schroeder, J. J. Spaans, and P. Larroy,
request distribution and file caching,” Systems and Software, “Linux Advanced Routing and Traffic Control HOWTO,”
vol. 81, no. 11, pp. 2044–2058, 2008. http://www.tldp.org/HOWTO/Adv-Routing-HOWTO, 2004.
[34] V. S. Pail, M. Aront, G. Bangat, M. Svendsent, [49] S. Floyd, “Recomendations on using the gentle va-
P. Druschel, W. Zwaenepoelt, and E. Nahum, “Locality- riant of RED,” http://www.icir.org/floyd/red/gentle.html,
Aware Request Distribution in Cluster-based Network Serv- 2000.
ers,” in Proc. of the 8th International conference on Architectural
Support for Programming Languages and Operating Systems, 1998.
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 8, AUGUST 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 15