Home

prefork

Prefork is a server architecture used in some web servers where the master process spawns a pool of child processes. Each child handles a single client connection at a time, and the master forks new children as demand increases, up to configured limits. This approach emphasizes process isolation and simplicity.

Historically, prefork is associated with the prefork Multi-Processing Module (MPM) of the Apache HTTP Server. In

Advantages of prefork include compatibility with non-thread-safe modules, such as older versions of PHP and certain

Disadvantages include higher memory usage, since each process loads its own copy of modules and data. Concurrency

In contemporary deployments, many servers favor threaded or event-driven models (such as Apache’s worker or event

See also: Apache HTTP Server, Multi-Processing Module, mod_php, Worker MPM, Event MPM.

this
model,
threading
is
avoided
entirely,
with
requests
served
by
separate
processes
rather
than
by
threads
within
a
single
process.
database
drivers.
The
isolation
between
processes
reduces
the
risk
that
a
failure
in
one
request
affects
others,
and
memory
protection
is
straightforward
because
each
process
has
its
own
address
space.
is
limited
by
the
number
of
processes,
and
context
switching
can
become
a
bottleneck
under
heavy
load.
This
model
is
generally
less
efficient
on
modern
hardware
for
high
traffic
due
to
its
inability
to
leverage
threads
for
sharing
resources.
MPMs
or
Nginx)
to
improve
scalability
and
resource
utilization.
Prefork
remains
in
use
when
stability
and
compatibility
with
legacy
modules
are
prioritized.