[Mod_gzip] mod_gzip, mod_proxy and mod_ssl ( follow-up )

mod_gzip@lists.over.net mod_gzip@lists.over.net
Wed, 8 Oct 2003 13:55:06 EDT


Hi Christopher...
Kevin Kiley again...

I forgot to mention something that most people
probably don't realize when it comes to using
'redirections' in Apache such as the ones that
allow mod_gzip to work with mod_ssl in 
the Apache 1.x series.

Even though it might LOOK like you are sending
requests to/from different 'Servers' by configuring
various proxies and virtual-servers... the actual
OVERHEAD for doing so is nothing like what you
might be imagining in your head.

These 'redirections' are taking place INTERNALLY
in the Apache code and it's nothing like actually
SENDING request to/from different 'machines'
or even different Servers running as separate 'tasks'
on the same machine.

There are no 're-connects' or 're-transmits' that
need to happen for these Apache INTERNAL
re-directs. It all happens INSTANTLY inside the
Server itself. It just sets some flags on the
connection/request structure(s) and JUMPS
instantly back to certain re-entry points.

It's not actually 're-connecting' to these 'other'
Servers or anything like what actually happens
between 2 'Servers' on 2 different machines.

The 'data' itself is also not being 're-sent' to/from
these 'other' internal 'connections'. They can
all see the same data buffer(s) that have 
already 'arrived'.

The whole re-direct thing is really just 'pretending'
that these internal redirects are 'different Servers'.

mod_proxy is a very special module in Apache and
the way it 'gets' its requests is by pre-pending 
a special 'proxy:' keyword onto the front of the
URIs travelling through the Server. It's just a way
for every module in the Server to 'see' that this
is a PROXY request instead of a normal one.
Apache is not really 'talking' to some 'other' 
Server when mod_proxy is in use. It is still just
'talking' to itself at the speed of light.

The overhead for using these Apache INTERNAL
re-directs inside the same Server is really
negligible. You could re-direct a transaction
internally through a dozen VIRTUAL hosts
and/or mod_proxy and it still wouldn't come
near the overhead required to just run 1 single
CGI script to process a transaction.

Just thought I would point that out if you are
thinking that these Apache re-directs are
chewing up CPU and/or TCP/IP resources.

It's really not the case.

Later...
Kevin