Modeling 3-Tiered Web Services
Total Page:16
File Type:pdf, Size:1020Kb
Modeling 3-Tiered Web Services Xue Liu Jin Heo Lui Sha University of Illinois at University of Illinois at University of Illinois at Urbana-Champaign Urbana-Champaign Urbana-Champaign [email protected] [email protected] [email protected] Abstract In addition to capacity planning, a simple yet accurate model of Web services is also instrumental The rapid advancement and deployment of Web for other purposes such as overload control [5, 6] or services call for a precise yet simple model for resource provisioning [7-9]. Overload control and capacity planning and analysis purposes. The most performance management are research areas on their widely deployed Web services architecture is the 3- own, but their effectiveness are based on the tiered system, which is composed of a front-end Web accuracy of good performance models. server, an application server and a backend database Most of the existing work of Web services server. In this paper, we present an analytical model performance modeling is confined to the front-end of the 3-tiered Web services architecture. We show Web server. Wells et al. [10] made a performance by using queueing network theory, we can model the analysis of Web servers using colored Petri nets. 3-tiered Web services architecture accurately. A Their model is divided into three layers, where each testbed is built to measure model parameters based layer models a certain aspect of the system. The on industry standard server components and TPC-W model has several parameters, some of which are benchmark. Validation results show the proposed known and the remaining unknown parameters are model predicts performance measures such as determined by simulations. Dilley et al. [11] used a response time and throughput accurately. layered queuing model for analysis of Web server. Recently, Cao et al. [12] provides a MG//1/ K 1. Introduction and Related Work processor sharing queue model for Web server which assumes Poisson arrival, general service time and As E-Commerce is keeping rapid pace of growth bounded accepted request number of K . An [1], the underlying architecture providing the service improved version is given in [13] using Markov of E-Commerce is becoming more and more Modulated Poisson Process (MMPP) to model bursty important. The architecture is generally called as arrival. Cherkasova and Phaal [14] used a similar “Web services”. The term “Web services” describes model to that in [12] but assumed deterministic specific business functionality exposed by a company service time distribution and session-based workload. through Internet connection, for the purpose of Few work has been done to model the integrated providing a way for another entity to use the services Web services architecture. In [15], Karma et al. use it provides [2]. Web services are the building blocks an abstraction of M/G/1 processor sharing queue to for the future generation of applications and solutions represent the whole 3-tiered architecture. This is in on Internet. essence a single tier modeling for the bottlenecked One of the most pressing problems faced by Web server in the Web services architecture. Doyle et al. services designers and deployment companies is the [7] presents a simplified analytical model to predict adequate sizing of their infrastructure so that they can the response time of Web services. Their model is a provide the quality-of-service (QoS) required by their combination model of server CPU and storage I/O. clients. This is known as the capacity planning Still, the model only applies to single tier and is valid problem. As Web keeps evolving, it is critical for a only for static content requests. service provider to provide service level assurances In this paper, we propose a new and effective and agreements to its customers. A validated model model of the 3-tiered Web services architecture. The of Web services architecture is the basis of capacity model provides a quantitative way to analyze the performance in different settings [3, 4]. effectiveness of the Web services. In contrast to most of the previous work, which has only addressed one tier or much simpler workload (static content), our All the business logic for a Web site resides in the approach is fundamentally concerned with multi- 2nd tier -- application server. Application server tiered Web sites that include dynamic content and receives requests from Web server, looks up back-end databases. As a result, the proposed model information in database (3rd tier) and processes the provides higher accuracy yet still remains simple. A information. The processed information is then simple model is important in performance modeling passed back to the Web server where it is formatted because it renders a smaller parameter space thus to be displayed on clients’ machines. Typical easier to estimate; while a complicated model usually application server includes Apache Tomcat, Sun Java contains parameters that are difficult to obtain and System Application Server, BEA WebLogic, IBM validate. Hence a simple model tends to be more WebSphere, and JBOSS. useful in real-world applications [4]. The 3rd tier -- database server is the storehouse of The rest of the paper is organized as follows. a Web site's information. Everything from user Section 2 provides the background of Web services accounts and catalogs to reports and customer orders architecture. In Section 3, we first give an individual is stored in database. Typical database server used in model of each tier in the Web services architecture, Web services architecture includes Oracle, Microsoft then the analytical model of 3-tiered Web services is SQL Server, Sybase, IBM DB2, MySQL, and presented. Solution techniques for the proposed PostgreSQL. model are discussed in Section 4. The design and We built a testbed to emulate an online Web implementation of our Web services testbed are services provider in our Lab. The front-end is using discussed in Section 5. We present the validation Apache Web server [18], application server is procedure and results of the proposed model in running Tomcat [19], and the backend database is Section 6. Finally, we conclude the paper with running MySQL [20]. The reasons that we select this directions of future work in Section 7. combination are: 1) all of them are open source projects and freely available; 2) their performances 2. Background are among the highest of all individual components; 3) they are widely used on the Internet, even in Modern Web services providers use a multi-tiered commercial sites such as Amazon.com, Mp3.com and architecture to provide required services. While some Yahoo Finance to provide Web services. Hence this Web applications use two tiers—Web server and combination is quite representative to the current database server—high volume sites typically add a technology. It is worth noting that the analytical third tier: application server to support complex model proposed in this paper (Section 3) does not business logic. As a consequence, the most widely depend on this specific combination and is general deployed infrastructure of Web services is the 3- enough for modeling other Web services tiered architecture which is shown in Figure 1. This deployments. 3-tiered architecture provides both high level of scalability and reliability [16, 17]. 3. Modeling of 3-Tiered Web Services Architecture Client In this section, we present an analytical model for Client Database the 3-tiered Web services architecture. We use the Web Application Server Server Server typical deployment consisting of Apache, Tomcat Client and MySQL discussed above for better explanation Figure 1. 3-Tiered Web services architecture and understanding of the intuitions behind the analytical model. In other Web services deployments, In this 3-tiered architecture, on the front line of a individual tier’s architecture is similar; hence the typical Web site is the Web server that acts as the proposed model can be easily applied to other set-ups presentation layer. This tier has three functionalities: with little modification. (1) Web server receives requests from the clients, service static Web requests; (2) at the same time 3.1. Web Server Architecture and Modeling forwards complex dynamic content requests to the 2nd tier; (3) receives responses from the 2nd tier and Modern Web server typically utilizes a multi- sends them back to the clients. Typical Web server threaded (or multi-process) architecture. It is includes Apache and Microsoft Internet Information structured as a pool of worker threads to handle Server (IIS). HTTP requests. Apache [18] has been the most popular Web services for security and state maintenance, along server on the Internet. The February 2005 Netcraft with data access and persistence support. Web Server Survey [21] shows that 68.8% of the Application server typically consists of Servlet Web sites on the Internet use Apache, which makes it Engine and EJB (Enterprise Java Beans) container. the dominant Web server deployed. Servlet Engine is a place to execute Java Servlets, a basic building block of Web applications. EJB Clients container is the environment that Java beans will Clients execute in, and EJB container will manage transactions, thread pools, and connection pools. + Tomcat [19] is a servlet engine that is used in the AJPv13 official reference implementation for the Java Servlet HTTP and Java Server Pages (JSP) technologies [22]. MaxClients Unlike commercial Web application servers, Tomcat New conn TCP is not an EJB container but only a servlet engine. Accept queue This means it supports servlets and plain Java objects Apache mod_jk nd Tomcat but not EJBs. Here, we use Tomcat for the 2 tier in our testbed, since it is easy to configure and deploy Figure 2. Apache multi-threaded architecture applications. The functionalities such as transaction The flow of servicing a HTTP request in Apache management which are usually provided by EJB (version 1.3.x and version 2.x) is displayed in Figure container are implemented in the application level in 2.