Apache2 BootCamp : Understanding Apache Internals


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Apache2 BootCamp : Understanding Apache Internals

  1. 1. #2 Day #1 Understanding Apache Internals Wildan Maulana wildan.m@openthinklabs.com http://workshop.openthinklabs.com
  2. 2. Overview● How to Evolution of the Web Affected the Design of Web Servers● The Modular Architecture of the Apache Web Server and The Benefits that Each Component Provides● How Apache Processes a Request Internally
  3. 3. Evolution of The WebStatic Content Dynamic Content
  4. 4. Apache Architecture
  5. 5. Multi-Processing Modules (MPMs)
  6. 6. Additional MPMs● Perchild MPM Maintains several process running under different user IDs.
  7. 7. MPM Selection and Compatibilty● MPM Selection Depends on many Factors : ● Support for Specific Third-Party Modules and Functionality ● Some MPMs Perform Better in Certain Platform● Threaded MPM is preferred in most Unix platforms, including Linux and Solaris.
  8. 8. Hooks● A Hook is Mechanism that Enable Apache Modules to Modify the Behavior of the Server or Other Modules● Some of the Hooks that Apache Provides : ● Connection Phase ● Authorization ● Header Modification ● Content Handling
  9. 9. Multi-Protocol Support● Apache 2.0 can be Extended to Process Protocols Other Than HTTP ● mod_ftp ● mod_pop3
  10. 10. Content-Handling Modules● Content Handlers and Generators are Modules that Provides the Content that will be Returned to the Browsers. ● PHP5 ● mod_perl
  11. 11. Connector ModulesApache ↔ Connector ↔ {External Application} ex. BEA Weblogic, Tomcat Servlet Engine
  12. 12. Filters● You can Think of the Filtering Architecture in Apache as a Factory Assembly Line. Filters are Workers in the Factory, and Request and Responses are the Item Traveling in the Line. ● Encryption ● Compression ● Watermarking ● Virus Scanning ● Session Tracking
  13. 13. Access/Authentication/Authorization Modules● These Modules Provides Mechanisms to Authenticate the Identify of a User and to Restrict Access to Spesific Resource ● The Restriction Can be Done By – Identify of the User – Network Information (Such As the Client IP Address or Protocol Used) – The Type of Resource Being Accessed● There are Apache Authentication Modules for Difference Backend ● Unix-Style Password Files ● LDAP ● Barkeley-Style Databases ● Oracle ● Network Information Services (NIS)
  14. 14. Apache Portable Runtime (APR)● APR is Common Library for Platform-Dependent Functionality● APR is Divided into Core Libraries (Fundamental Portable Functions) and APR Util (Other Code that Needs to be Portable).● APR Core Covers the Following : ● File Creation and Manipulation ● Socket Programming ● Threads and Processes ● String Management ● Shared Memory● APR Util Covers These Areas : ● DBM Database Abstraction Layer ● XML Library ● Digest ● Base64 Encoding
  15. 15. A Day in the Life of a Request
  16. 16. A Day in the Life of a Request● Apache Startup● Request Process● Checking for Hooks ● URI Translation Phase ● Access Control Phase ● Authentication ● Authorization ● MIME-Type Checking ● Filters ● Content Handler ● Logging ● Cleanup
  17. 17. Q&Ahttp://workshop.openthinklabs.com/resources
  18. 18. Reference● Daniel Lopez Ridruezo; SAMS Teach Yourself Apache2 in 24 Hours, SAMS Publishing, 2002 (Buy this book on Amazon)