Flash: An Efficient and Portable Web Server
2015-04-27 20:14
316 查看
Introduction
This paper presents the design of a new Web server architecture called the asymmetric multi-process event-driven (AMPED) architecture, and evaluates the performance of an implementation of this architecture, the Flash Web server.在这之前,主要存在3种不同的web server architecture
The single-process event-driven (SPED) architecture
The multi-process (MP) architecture
The multi-threaded (MT) architecture
Simplified Request Processing Steps
All of these steps involve operations that can potentially block.
read data or accept connections from a socket may block if the expected data has not yet arrived from the client.
write to a socket may block if the TCP send buffers are full due to limited network capacity.
test a file’s validity (using stat()) or open the file (using open()) can block until any necessary disk accesses complete.
reading a file (using read()) or accessing
data from a memory-mapped file region can block while data is read from disk.
3种不同的web server architecture存在的问题
The single-process event-driven (SPED) architecturesingle process of execution.
using non-blocking system calls to perform I/O operations(An operation like select or poll).
non-blocking read and write operations work as expected on network sockets and pipes, but may actually block when used on disk files.
read,write,open and stat operations may still be blocking.
The multi-process (MP) architecture
each process handles one request.
disadvantages
each process has its separate address space.
cannot share data: separate cache.
context switch overhead(上下文切换所带来的开销).
The multi-threaded (MT) architecture
each thread handles one request.
advantages
one address space: all threads share one cache.
less context switch overhead.
OS has to support kernel threads
Asymmetric Multi Process Event Driven
Combination of MP and SPED.
Use non-blocking calls to perform network and pipe operations.
Use helper process to perform blocking disk I/O operations,Helper process can be a separate thread or process.
Master and Helper process communicate through IPC
Master and Helper mmap() the same request file.
Helper process reads file from disk and brings into memory.
Helper notifies master that file is ready.
Avoid data transfer between processes.
Flash web server
Implementation of the AMPED architecture.Uses aggressive caching
The helper processes are responsible for performing
pathname translations and for bringing disk blocks into memory.
Response header caching
Caching of already mapped files.
文章下载
相关文章推荐
- Flash: An Efficient and Portable Web Server
- How to Install NoCat Splash and Link it to an External Web Server
- web server and web service
- Build Web Server with Apache and Passenger
- AndServer,一个Android端的web服务器
- The specified CGI application encountered an error and the server terminated the process
- Web.js MVC between client and server
- flash + php + nusoap实现flash and webservice的留言板
- Error: The Web Server Has Been Locked Down and Is Blocking the DEBUG Verb
- Setting up Django and your web server with uWSGI and nginx
- 打不开MSDN,出现提示The specified CGI application encountered an error and the server terminated the process
- The specified CGI application encountered an error and the server terminated the processThe specified CGI application encountered an error and the server terminated the process
- 【HTTP】Speed and Mobility: An Approach for HTTP 2.0 to Make Mobile Apps and the Web Faster
- Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 解决办法
- Cannot start session without errors, please check errors given in your PHP and/or webserver log file
- An Epoll example -- server and client
- 解决appium org.openqa.selenium.WebDriverException: An unknown server-side error occurred while process
- The R*-tree: An Efficient Robust Access Method for Points and Rectangles
- How to Install Laravel with an Nginx Web Server on Ubuntu 14.04(Composer,laravel,nginx)
- 【翻译】EAST: An Efficient and Accurate Scene Text Detector