Web Server Architectures

Similar documents
Analysis of Delivery of Web Contents for Kernel-mode and User-mode Web Servers

Development and Evaluation of an Experimental Javabased

A Hybrid Web Server Architecture for e-commerce Applications

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture

One Server Per City: C Using TCP for Very Large SIP Servers. Kumiko Ono Henning Schulzrinne {kumiko, hgs}@cs.columbia.edu

Web Server Software Architectures

Flash: An Efficient and Portable Web Server

Comparing the Performance of Web Server Architectures

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

A Hybrid Web Server Architecture for Secure e-business Web Applications

Resource Containers: A new facility for resource management in server systems

Why Threads Are A Bad Idea (for most purposes)

Eloquence Training What s new in Eloquence B.08.00

Performance Comparison of Uniprocessor and Multiprocessor Web Server Architectures

COURSE OUTLINE Survey of Operating Systems

Distributed File Systems

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Chapter 2: OS Overview

Windows8 Internals, Sixth Edition, Part 1

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Scalability for IoT Cloud Services

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Operating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015

Managing Prefetch Memory for Data-Intensive Online Servers

Chapter 1: Introduction. What is an Operating System?

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Survey Flash Slides. CS 256/456 Fall 2013 Department of Computer Science University of Rochester 12/12/2013 CSC 2/456 1

Oracle9i Release 2 Database Architecture on Windows. An Oracle Technical White Paper April 2003

A Comparative Study on Vega-HTTP & Popular Open-source Web-servers

A Deduplication File System & Course Review

Distributed Systems LEEC (2005/06 2º Sem.)

Performance And Scalability In Oracle9i And SQL Server 2000

E) Modeling Insights: Patterns and Anti-patterns

Performance Comparison of Assignment Policies on Cluster-based E-Commerce Servers

Network Infrastructure Services CS848 Project

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services

Performance Testing. Configuration Parameters for Performance Testing

OS Thread Monitoring for DB2 Server

Web Application s Performance Testing

A distributed system is defined as

INTRODUCTION TO COMPUTING CPIT 201 WEEK 13 LECTURE 3

How To Understand The History Of An Operating System

scalability OneBridge

OPERATING SYSTEMS Internais and Design Principles

MAGENTO HOSTING Progressive Server Performance Improvements

Chapter 6, The Operating System Machine Level

Operating Systems Overview

I/O Device and Drivers

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

Types Of Operating Systems

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Performance Evaluation of Shared Hosting Security Methods

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Berkeley Ninja Architecture

Tivoli IBM Tivoli Web Response Monitor and IBM Tivoli Web Segment Analyzer

Business white paper. HP Process Automation. Version 7.0. Server performance

Making Multicore Work and Measuring its Benefits. Markus Levy, president EEMBC and Multicore Association

Capacity Estimation for Linux Workloads

COS 318: Operating Systems. Virtual Machine Monitors

Testing & Assuring Mobile End User Experience Before Production. Neotys

Adaptive Overload Control for Busy Internet Servers

CPU Scheduling Outline

Comparing and Evaluating epoll, select, and poll Event Mechanisms

Contents. Chapter 1. Introduction

SEDA: An Architecture for Robust, Well-Conditioned Internet Services

Part 3 - Performance: How to Fine-tune Your ODM Solution. An InformationWeek Webcast Sponsored by

Course Development of Programming for General-Purpose Multicore Processors

CHAPTER 15: Operating Systems: An Overview

CHAPTER 1 INTRODUCTION

Comparison of Web Server Architectures: a Measurement Study

How To Understand And Understand An Operating System In C Programming

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

BBM467 Data Intensive ApplicaAons

Virtualization. Pradipta De

Configuring Apache Derby for Performance and Durability Olav Sandstå

Implementing Probes for J2EE Cluster Monitoring

A REVIEW PAPER ON THE HADOOP DISTRIBUTED FILE SYSTEM

Cloud Operating Systems for Servers

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

Red Hat Linux Internals

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Virtual machine interface. Operating system. Physical machine interface

Transcription:

Web Server Architectures CS 4244: Internet Programming Dr. Eli Tilevich Based on Flash: An Efficient and Portable Web Server, Vivek S. Pai, Peter Druschel, and Willy Zwaenepoel, 1999 Annual Usenix Technical Conference, Monterey, CA, June 1999.

Design Goals Performance & Quality of Service (Systems) Good responsiveness; low latency Good concurrency Can support multiple clients simultaneously High throughput Graceful degradation Low memory consumption Ease of development (Software Engineering) Simple to understand, fine-tune, add new features, debug, etc.

What Web Servers Do In response to a Web client request (e.g., http://google.com/index.html) a Web server: Accepts network connection Parses the request (index.html) Reads file from disk or runs a dynamic content generator Sends content (headers and body) back

Single-Threaded Web Server Accept Connection Parse HTTP Request Read File or generate content Send Data One process sequentially handles all client connections Simple requires no synchronization Does not scale (one client at a time)

Optimizations? Caching Pathname translation Some dynamic content File operations

Additional Features of Web Servers Logging Security (e.g., access control) Traffic analysis Require centralized data structures to implement

Main Server Architectures Multi-process (Apache on Unix) Multi-threaded (Apache on NT/XP) Single process event driven (Zeus, thttpd) Asymmetric multi-process event-driven (Flash)

Multi-Process Architecture Process 1 Accept Connection Process N Accept Connection Parse HTTP Request Parse HTTP Request Utilizes multiple processors Easy to debug Can pre-fork a pool of processes Read File or generate content Read File or generate content Inter Process Communication is difficult and expensive High memory cost, context switches Send Data Send Data

Multi-Threaded Architecture Accept Connection Parse HTTP Request Read File or generate content Send Data Utilizes multiple threads, good performance Easy to change threading policies Need to synchronize, to avoid data races Resources utilization (kernel and user-level): memory consumption, context switches, startup Blocking I/O can cause deadlocks

Single Process Event-Driven Accept Connection Parse HTTP Request Read File or generate content Send Data Event Dispatcher Use a selector to check for ready file descriptors Uses a finite state machine to determine how to move to the next processing stage No context switching, no synchronization, single address space Modern OS do not provide adequate support for asynchronous disk operations

Asymmetric Multi-Process Event-Driven Accept Connection Parse HTTP Request Read File or generate content Send Data Event Dispatcher Helper 1 Helper N Similar to Single Process Event-Driven but with helpers for blocking I/O (e.g., disk requests)

Real Workload (On Solaris)

Performance in WAN (Adding Clients)

Performance Comparison MP MT SPED AMPED Disk Blocking Memory Cons. Disk Usage + (only one proc.) - (separate mem. space per proc.) + - (whole server proc. blocks) + + + + + + - (one disk request at a time) +

Challenges of Using Threads Need for synchronization Deadlocks, starvation Race conditions Scheduling can be tricky

Challenges of Using Events Only one process/thread is used High latency for long running handlers Control flow is obscure Difficult to write, understand, and modify

Hybrid Approach SEDA: Staged Event-Driven Architecture SEDA: An Architecture for Well-Conditioned, Scalable Internet Services, Matt Welsh, David Culler, and Eric Brewer. In Proceedings of the Eighteenth Symposium on Operating Systems Principles (SOSP-18), Banff, Canada, October, 2001. Uses thread pools and events Events organized into stages Each stage has a thread pool Load conditioning; graceful degradation