bswen at pku
Jul 31, 2012, 1:04 AM
Post #2 of 2
I hope that httpd 3 would further consider some performance optimization ideas (many of which may be quite old, though), particularly the asynchronous network I/O improvement to the MPM layer, so that every worker thread (or worker process) will not have to deal with a single TCP connection all the time when the connection is kept alive. One big expectation is that at least the next version 3 of MPM_WINNT has an option to use an optimized IOCP (I/O completion port) model, where we need only a few threads to handle thousands of concurrent connections, even though such option may come with limitations like no (full) support for HTTPS.
From: Nick Gearls [mailto:nickgearls [at] gmail]
Sent: Thursday, July 26, 2012 4:42 PM
To: Development Apache
Subject: httpd 3
It was requested to provide some ideas for the direction to go with httpd 3.
One of the main issues I'd like to be tackled is the lack of consistency in the directives for linked functionalities.
- Some modules have access to variables set with Setenv, but not those set with SetenvIf (and the opposite)
- Setenv & SetenvIf are not processed sequentially (first all Setenv, then all SetenvIf)
- SetenvIf can overwrite a variable (set with SetenvIf ) inside a location, but Setenv cannot
- Every module is using its own tag parsing to access environment variables (and request info).
This is not only redundant, but
- variable expansion is not available in some modules
- the syntax is not always the same
- all variables are not available in all modules (ex: SSL variables are not always available)
- Filters set with AddOutputFilterByType are not removed with RemoveOutputFilter
- Modules using outgoing connections (ex: OCSP requests in mod_ssl) do not benefit from the pooling features available in mod_proxy
- RewriteRule[P] can be used instead of ProxyPass but ProxyPass directives are executed first, even if a RewriteRule appears first
In a general way, there is absolutely no info about this lack of consistency and, every time a question is asked, developers have more or less to guess the answer (by looking at the code I guess).
Could this problem be solved by
- centralizing some functionalities and generalizing some mechanisms
- formalize the way to use them
- defining a directive processing order based on the functionality instead of the module
- and DOCUMENT all of this
This would really be a huge benefit for advanced use of httpd.