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存在的问题
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.
文章下载
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|