Bacioiu Florentina, Load Balancing for Web Services [600593]
Bacioiu Florentina, Load Balancing for Web Services
1 | P a g e
Load Balancing for Web Services
Student: [anonimizat]: S. I. CATALIN LEORDEANU
Internet Systems Engineering, Faculty of Automatic Control and
Computer Science, University Politehnica of Bucharest
Bacioiu Florentina, Load Balancing for Web Services
2 | P a g e
Contents
1.1 Web Service Definition ………………………….. ………………………….. ………………………….. ………………….. 4
1.2 Web Service Architecture ………………………….. ………………………….. ………………………….. ………………. 4
1.2.1 Web Service Roles ………………………….. ………………………….. ………………………….. ………………….. 4
1.2.2 Web Service Protocol St ack ………………………….. ………………………….. ………………………….. ……… 5
1.2.3 Technologies ………………………….. ………………………….. ………………………….. …………………………. 5
2.1 Load balancing ………………………….. ………………………….. ………………………….. ………………………….. … 7
2.1.1 Web service load balancing th rough statistical monitoring ………………………….. …………………….. 7
Bibliography ………………………….. ………………………….. ………………………….. ………………………….. …………. 9
Bacioiu Florentina, Load Balancing for Web Services
3 | P a g e
Figure 1 Web Service Roles ………………………….. ………………………….. ………………………….. …………………. 4
Figure 2 Web Service Protocol Stack ………………………….. ………………………….. ………………………….. …….. 5
Bacioiu Florentina, Load Balancing for Web Services
4 | P a g e
1.1 Web Service Definition
A web service is any service that is available over the Internet or a private (intranet) network, uses a
standardized XML messaging system, and is not tied to any one operating system or programming
language. Web services are usually exp osed over HTTP and they ensure the interoperating between two
systems.
In addition, although not required, two other desirable properties of web services are being self –
describing via a common XML grammar and discoverable via a simple find mechanism. In o ther words, a
web service is self -describing if, when published, it also has a public interface written in a common XML
grammar to the service – that can be used to identify all public methods, method arguments, and return
values , and a documentation easy to read for other developers in order to make integration with other
services easily. Also, being discoverable implies a simple publishing mechanism and a simple search
mechanism so interested parties can locate the service and its public interface. (1)
1.2 Web Service Architecture
The web service architecture can be described from two points of view: considering the individual roles
of each web service actor (section 1.2.1) and analyzing web service protocol stack – one that continues
to grow and evolve (section 1.2.2) .
1.2.1 Web Service Roles
There are three major roles in the web services architecture:
Figure 1 Web Service Roles
1. Service provider – implements and makes the service available on the Internet.
2. Service requestor – the consumer of the web services that makes XML requests and receives XML
answers from the web service through an open network connection.
3. Service registry – provides a centralized location where new web ser vices can be published and
existing web services can be found.
Bacioiu Florentina, Load Balancing for Web Services
5 | P a g e
1.2.2 Web Service Protocol Stack
Although web services evolve, additional layers may be added, and additional technologies may
be added to each layer , the stack has four main layers:
1. Service transport – is responsible for transporting messages between applications; examples:
Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), File Transfer Protocol
(FTP), Blocks Extensible Exchange Protocol (BEEP).
2. XML messaging – encodi ng messages in a common XML format; XML -RPC, SOAP.
3. Service description – describes the public interface to a specific web service; Web Service
Description Language (WSDL).
4. Service discovery – centralizes services into a common registry and provides easy publishing and
discovery for web services; Universal Description, Discovery, and Integration (UDDI).
Figure 2 Web Service Protocol Stack
1.2.3 Technologies
Hypertext Transfer Protocol (HTTP) is a simple, stateless protocol that facilitates the communication on
the web . It operates at the highest level of the OSI model – Application layer, and defines the
communication between a client and a server by specifying how the client and server should interact.
HTTP defines a req uest made by the client and includes a command for the server to interpret and to
send back a response. HTTP is a simple, stable and popular option to use for service transport. However,
it does raise a number of security concerns that will be discuss late r on this paper.
Extensible Markup Language (XML) is a markup language used for representing structured information . It
is one of the most widely -used formats for sharing structured information nowadays and its syntax rul es
are very strict. The request mes sage sent by the client to the web service uses XML and also the server`s
response is based on XML syntax.
XML -RPC is a simple protocol that uses XML messages to perform RPCs.
Bacioiu Florentina, Load Balancing for Web Services
6 | P a g e
SOAP – Simple Object Access Protocol, is as a standardized packaging protocol for the messages shared
by applications, based on XML. In fact, SOAP is XML, as relies on XML standards like XML Schema and
XML Namespaces for its definition and function. (2)
REST is an architectural style of the World Wide Web, having a set of constraints based on resource
design and uniform interface interaction. “RESTful services model the interaction with user agents based
on resources. Each resource is represented by a unique URI, and the user agent uses the uniform
interface of HTTP to interact with a resource via that URI.” (3)
WSDL – Web Service Description Language, is an XML vocabulary used to describe SOAP -based web
services. In web service s, WSDL describes which interface the service exposes and the representation
formats: the schemas for the XML documents the service accepts and sends . In the same time, WADL –
Web Application Description Language (WADL) is an XML vocabulary used to describe R ESTful web
services. In other words, WADL describes how one resource links to another. (4)
In the long term, web services also offer the promise of the automated Web . If services are easily
discoverable, self -describing, and st ick to common standards, it is possible to automate application
integration. Some in the industry have referred to this as "just -in time" application integration.
There are currently many competing frameworks and proposals for web services. The three main
contenders are Microsoft's .NET, IBM Web Services, and Sun Open Net Environment (ONE). While each
of these frameworks has its own particular niche and spin, they all share the basic web service definition
and vision put forth here. Furthermore, all of the frameworks share a common set of technologies,
mainly SOAP, WSDL, and UDDI.
Bacioiu Florentina, Load Balancing for Web Services
7 | P a g e
2.1 Load balancing
2.1.1 Web service load balancing through statistical monitoring
Web services can consist nowadays of dozens or even hundreds of type requests that lead to poor
performance, as the system is forced to increase the response times for all the requests. Since studies
have shown that a user is willing to wait not more than eight seconds before he retries his request or
leaves the site, the need for an admission control is very clear.
In order to design a web service that is able to respond in a timely fashionable manner to requests
simple , four design mechanisms have been pr oposed: statistical techniques for uncovering request
effects in multi -tier systems , a black -box approach to middleware component monitoring , a visualization
tool summarizing statistical findings to f acilitate human decision making and efficient technique s for
operators to invoke admission control decisions based on those findings .
UNCOVERING REQUEST E FFECT THROUGH CORRELATIONS
The aim is to find relationships between the request and CPU load, after capturing the logs from the web
level of the system and the CPU load average. This way, it can be discovered which requests are
correlated with the bottlenecks. As per the statistical technique, the logs are processed in three steps: 1.
Divide the web log into time intervals (t = 1s); 2. Count the number of ea ch request type for each
interval; 3. Form an n x m matrix, where n is the number of time intervals and m is the number of
request types. Each element (i, j) of the matrix represent the number of requests of type j that arrived in
time period i.
“We then find the correlation between columns of this matrix and the vector of CPU load from the
database (this technique can be used for other bottlenecks such as disk I/O)”. (5) The request types with
the highest positive coefficient values are the candidate request types that should undergo admission
control.
BLACK -BOX COMPONENT MONITORING
Black -box component monitoring relies on self -monitoring for providing statistical inference algorithms,
while monitoring being as minimally inv asive as possible. The main reasons when considering this aspect
are the fear of heaving a disrupting running service, along with the rapidly changing services and the
distributed ownership of the services.
A VISUALIZATION TOOL FOR AUTOMATIC O VERLOAD MITIGATION
Better decisions can be made regarding the system if a better visualization for the relationships between
components and load can be provided. This approach advocates the need of using an efficient
visualization tool that is suitable for the needs of the system.
Bacioiu Florentina, Load Balancing for Web Services
8 | P a g e
EFFECTIVE ACTUATORS FOR ADMISSION CONTROL
After having the request candidates for selective admission control, the rate at which they arrive can be
reduced by using additional strategies, such as using the 503 TOO BUSY message at t he HTTP level,
without modifying the web level.
As a conclusion, in order to provide a system that is less exposed to bottlenecks and less error -prone, the
traffic must be analyzed, so the relationship between requests and their effects to be more visible . In
other words, it is “advantageous to preferentially throttle those requests most correlated with the
bottleneck”. (5) This approach has led to a web service to serve 70% more requests per second, with a
maximum request late ncy seen by the user reduced by 78%.
Bacioiu Florentina, Load Balancing for Web Services
9 | P a g e
Bibliography
1. Cerami, Ethan. Web Services Essentials. s.l. : O'Reilly, 2002. 0 -596-00224 -6.
2. Tidwell, Doug , Snell, James and Kulchenko, Pavel . Programming Web Services with SOAP. s.l. :
O'Reilly, 2001. 0 -596-00095 -2.
3. Flanders, Jon . RESTful .NET. s.l. : O’Reilly, 2009. 978 -0-596-51920 -9.
4. Richardson, Leonard and Ruby, Sam . RESTful Web Services. s.l. : O’Reilly, 2007. 978 -0-596-52926 -0.
5. Effective web service load balancing through statistical monitoring. Porter, George and Hatz, Randy H.
s.l. : Communi cations of the ACM, 2006, Vol. 49.
Copyright Notice
© Licențiada.org respectă drepturile de proprietate intelectuală și așteaptă ca toți utilizatorii să facă același lucru. Dacă consideri că un conținut de pe site încalcă drepturile tale de autor, te rugăm să trimiți o notificare DMCA.
Acest articol: Bacioiu Florentina, Load Balancing for Web Services [600593] (ID: 600593)
Dacă considerați că acest conținut vă încalcă drepturile de autor, vă rugăm să depuneți o cerere pe pagina noastră Copyright Takedown.
