You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by pe...@apache.org on 2002/10/31 10:20:04 UTC

cvs commit: modperl-docs/src/docs/tutorials/client/compression compression.pod

pereinar    2002/10/31 01:20:03

  Modified:    src/docs/tutorials Changes.pod config.cfg
  Added:       src/docs/tutorials/client/compression compression.pod
  Log:
  Added Web Content Compression FAQ by Slava.
  
  Submitted by:	"Slava Bizyayev" <sb...@outlook.net>
  Reviewed by:	Per Einar, Ged Haywood
  
  Revision  Changes    Path
  1.6       +5 -0      modperl-docs/src/docs/tutorials/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/tutorials/Changes.pod,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Changes.pod	5 Jun 2002 17:48:09 -0000	1.5
  +++ Changes.pod	31 Oct 2002 09:20:03 -0000	1.6
  @@ -9,6 +9,11 @@
   
   The most recent changes are listed first.
   
  +=head1 Ongoing
  +
  +* Added "Web Content Compression FAQ" by Slava Bizyayev E<lt>slava
  +  at) cpan.orgE<gt>
  +
   =head1 Wed Jun 5 19:24:05 CET 2002
   
   * Re-arranged content completely to better classify and be able to
  
  
  
  1.8       +1 -0      modperl-docs/src/docs/tutorials/config.cfg
  
  Index: config.cfg
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/tutorials/config.cfg,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- config.cfg	29 Jun 2002 19:21:51 -0000	1.7
  +++ config.cfg	31 Oct 2002 09:20:03 -0000	1.8
  @@ -30,6 +30,7 @@
       group => 'Client side facts and bugs',
       chapters => [qw(
           client/browserbugs/browserbugs.pod
  +        client/compression/compression.pod
       )],
   
       changes => 'Changes.pod',
  
  
  
  1.1                  modperl-docs/src/docs/tutorials/client/compression/compression.pod
  
  Index: compression.pod
  ===================================================================
  =head1 NAME
  
  Web Content Compression FAQ
  
  =head1 Description
  
  Compression of outgoing traffic from web servers is beneficial for
  clients, who get quicker responses, as well as for providers who use
  less bandwith. Many solutions exist for mod_perl and Apache, and we
  discuss some of the aspects involved here.
  
  This FAQ is written mainly for Internet content provider management
  familiar with Internet traffic issues and network equipment and its
  cost.  This document may also be informative for ISP system
  administrators and webmasters seeking to improve throughput and
  bandwidth efficiency.
  
  =head1 Q: Why it is important to compress web content?
  
  =head2 A: Reduced equipment costs and the competitive advantage of
  dramatically faster page loads.
  
  Web content compression noticeably increases delivery speed to clients
  and may allow providers to serve higher content volumes without
  increasing hardware expenditures.  It visibly reduces actual content
  download time, a benefit most apparent to users of dialup and
  high-traffic connections.
  
  =head1 Q: How much improvement can I expect?
  
  =head2 A: Effective compression can achieve increases in transmission
  efficiency from 3 to 20 times.
  
  The compression ratio is highly content-dependent.  For example, if
  the compression algorithm is able to detect repeated patterns of
  characters, compression will be greater than if no such patterns
  exist.  You can usually expect to realize an improvement between of 3
  to 20 times on regular HTML, JavaScript, and other ASCII content.  I
  have seen peak HTML file compression improvements in excess of more
  than 200 times, but such occurrences are infrequent.  On the other
  hand I have never seen ratios of less than 2.5 times on text/HTML
  files.  Image files normally employ their own compression techniques
  that reduce the advantage of further compression.
  
  =for html
  <blockquote>
  
  On May 21, 2002 Peter J. Cranstone wrote to the
  mod_gzip@lists.over.net mailing list:
  
  I<"...With 98% of the world on a dial up modem, all they care about is
  how long it takes to download a page.  It doesn't matter if it
  consumes a few more CPU cycles if the customer is happy.  It's cheaper
  to buy a newer faster box, than it is to acquire new customers.">
  
  =for html
  </blockquote>
  
  =head1 Q: How hard is it to implement content compression on an existing site?
  
  =head2 A: Implementing content compression on an existing site
  typically involves no more that installing and configuring an
  appropriate Apache handler on the Web server.
  
  This approach works in most of the cases I have seen.  In some special
  cases you will need to take extra care with respect to the global
  architecture of your web application, but such cases may generally be
  readily addressed through various techniques.  To date I have found no
  fundamental barriers to practical implementation of Web content
  compression.
  
  =head1 Q: Does compression work with standard Web browsers?
  
  =head2 A: Yes. No client side changes or settings are required.
  
  All modern browser makers claim to be able to handle compressed
  content and are able to decompress it on the fly, transparent to the
  user.  There are some known bugs in some old browsers, but these can
  be taken into account through appropriate configuration of the Web
  server.
  
  =head1 Q: What software is required on the server side?
  
  =head2 A: There are six known modules/packages for the Web content
  compression available to date for Apache (in alphabetical order):
  
  =over 4
  
  =item * Apache::Compress
  
  a mod_perl handler developed by Ken Williams (U.S.) which compresses
  output through C<Apache::Filter>
  
  =item * Apache::Dynagzip
  
  a family of mod_perl handlers, developed by Slava Bizyayev -- a
  Russian programmer residing in the U.S.
  
  =item * Apache::Gzip
  
  an example of mod_perl filter developed by Lincoln Stein and Doug
  MacEachern for their book I<Writing Apache Modules with Perl and C>
  (U.S.), which like C<Apache::Compress> works with C<Apache::Filter>.
  
  =item * Apache::GzipChain
  
  a mod_perl handler developed by Andreas Koenig (Germany), which
  compresses output through C<Apache::OutputChain>.
  
  =item * mod_deflate
  
  an Apache handler written in C by Igor Sysoev (Russia).
  
  =item * mod_gzip
  
  an Apache handler written in C. Original author: Kevin Kiley, I<Remote
  Communications, Inc.> (U.S.)
  
  =back
  
  In February 2002, Nicholas Oxh�j wrote to the modperl@apache.org
  mailing list about his own experience to find the appropriate Apache
  gzipping tool for streaming outbound content:
  
  =for html <blockquote>
  
  I<"... I have been experimenting with all the different Apache
  compression modules I have been able to find, but have not been able
  to get the desired result.  I have tried C<Apache::GzipChain>,
  C<Apache::Compress>, C<mod_gzip> and C<mod_deflate>, with different
  results.  One I cannot get to work at all. Most work, but seem to
  collect all the output before compressing it and sending it to the
  browser...>
  
  I<... Wouldn't it be nice to have some option to specify that the
  handler should flush and send the currently compressed output every
  time it had received a certain amount of input or every time it had
  generated a certain amount of output?..>
  
  I<... So I am basically looking for anyone who has had any success in
  achieving this kind of "streaming" compression, who could direct me at
  an appropriate Apache module.">
  
  =for html
  </blockquote>
  
  The C<Apache::Dynagzip> package wasn't publicly available at that
  time.
  
  =head1 Analysis of different packages
  
  =head2 Apache::DynaGzip
  
  C<Apache::Dynagzip> is most useful when one needs to compress dynamic
  outbound Web content (generated on the fly from databases, XML, etc.)
  when content length is not known at the time of the request.
  
  C<Apache::Dynagzip>'s features include:
  
  =over 4
  
  =item * Support for both HTTP/1.0 and HTTP/1.1.
  
  =item * Control over the chunk size on HTTP/1.1 for on-the-fly content compression.
  
  =item * Support for any Perl, Java, or C/C++ CGI applications.
  
  =item * Advanced control over the proxy cache with the C<Vary> HTTP header.
  
  =item * Optional control over content lifetime in the client's local
  cache with the C<Expires> HTTP header.
  
  =item * Optional extra-light compression
  
  (removal of leading blank spaces and/or blank lines), which works for all browsers,
  including older ones that cannot uncompress gzip format.
  
  =item * Optional support for server-side caching of the dynamically
  generated (and compressed) content.
  
  =back
  
  =head1 Maintainers
  
  The maintainer is the person you should contact with updates,
  corrections and patches.
  
  =over
  
  =item *
  
  Slava Bizyayev E<lt>slava (at) cpan.orgE<gt>
  
  =back
  
  =head1 Authors
  
  =over
  
  =item *
  
  Slava Bizyayev E<lt>slava (at) cpan.orgE<gt>
  
  =back
  
  Only the major authors are listed above. For contributors see the
  Changes file.
  
  =cut
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org