Apache Web Server
Articles,  Blog

Apache Web Server


Before we continue I would like to
briefly describe the Apache Web Server. It’s a popular open source web server,
and it’s one of the technologies that in the flash paper
the author’s compare against. My intent is not to give
a detailed lecture on Apache. That’s beyond the scope of the course,
but instead I wanted to give you enough
about the architecture of Apache, and how it compares to the models
that we discussed in the class. And also the other way around,
to understand how these discussions in class, are reflected
in real world designs.>From a very high level, the software
architecture of Apache looks like this. The core component provides
the basic server-like capability, so this is accepting connections and
managing concurrency. The various modules correspond to
different types of functionality that is executed on each request. The specific Apache deployment
can be configured to include different types of modules. For instance,
you can have certain security features, some management of dynamic content, or
even some of the modules are really responsible for
more basic HTP request processing. The flow of control is sort of similar
to the event driven model that we saw, in the sense that each request
passes through all of the modules. Like in the event driven module
each request ultimately passed through all the handlers. However, Apache’s a combination of a
multiprocess and a multithreaded model. In Apache, a single process, a single
instance, is internally a multithreaded, boss/worker process that has dynamic
management of the number of threads. There’s some configurable thresholds
that can be used to dynamically track when to increase or decrease
the number of threads in the pool. The total number of processes,
so the MP part of the model, can also be dynamically adjusted, and
for these, it’s information such as number of outstanding connections,
number of pending requests, CPU usage, a number of factors can drive how the
number of the threads per process and the total number of
processes are adjusted.

9 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *