[Info-vax] Apache + mod_php performance
Dan Cross
cross at spitfire.i.gajendra.net
Thu Oct 3 14:41:11 EDT 2024
In article <vdmnof$3r08j$1 at dont-email.me>,
Dave Froble <davef at tsoft-inc.com> wrote:
>On 10/2/2024 11:20 AM, Arne Vajhøj wrote:
>> On 10/2/2024 11:07 AM, Dan Cross wrote:
>>> In article <vdjmq4$37f8q$3 at dont-email.me>,
>>> Arne Vajhøj <arne at vajhoej.dk> wrote:
>>>> On 10/2/2024 10:47 AM, Dan Cross wrote:
>>>>> [snip]
>>>>> You do not seem to understand how this is qualitatively
>>>>> different from your test program not sending `Connection: close`
>>>>> with its single request per connection, and then blocking until
>>>>> the server times it out.
>>>>
>>>> It is qualitative different from what you are imaging.
>>>>
>>>> The client does not block until the server times out.
>>>
>>> So what, exactly, does it do?
>>
>> It moves on to next request.
>>
>> That request will block if the server can't serve it
>> because all processes are busy.
>>
>>> And what is the "problem" that
>>> you are imagining here? Please be specific.
>>
>> Go back to the first post in the thread.
>>
>> The numbers for Apache are low. Much lower than
>> for other servers.
>
>Are you assuming Apache is a well designed and implemented application?
Apache was fine for its era. It's the way that Arne is using it
that's broken. Anyone wanting to host a high-performance web
app on it would put a load balancer in front of it; that would,
in turn, mux requests from actual clients and distribute them
across a set of backend Apache instances. Caching would help
somewhat, too, so that static resources (like images) were
closer to the egress point of one's network (hence why I said,
"caching load balancer" earlier; why take the latency hit for
seldom-changing stuff?).
That sort of architecture is more or less still the way that
things work, but Apache as the backbone of the whole thing is
rather long in the tooth. I'm sure it's still used all over, on
a large number of sites. I'm equally sure if someone serious
were architecting something today for high volume, low-latency
web applications, Apache wouldn't be high on the list of servers
for HTTP. Most would just build a web server directly into
their application, which is almost trivially easy in a lot of
modern ecosystems; Go and Rust have very nice libraries that
make this really easy to do.
- Dan C.
More information about the Info-vax
mailing list