Forum Moderators: open

Message Too Old, No Replies

HTTP compression?

What is this?

         

Compworld

9:02 pm on Sep 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am considering using HTTP compression so that our site would load faster. How can I do this? Are there certain programs that are do this for the site? Are there any cons in doing something like this to an ecommerce site?

Thanks,

CompWorld

RonPK

6:18 am on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your webserver software is Apache, you'll need to install mod_gzip. There's no need to recompile Apache; just put the stuff in a directory and add some lines to httpd.conf.

Compression can save you a lot of bandwidth, especially if your pages mostly contain text. I haven't noticed any major drawbacks.

Nick_W

6:21 am on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think there may be some possible problems with UA's that don't accept gzipped data though...

You need to check this server-side before serving it I believe..

Nick

wkitty42

6:30 am on Sep 5, 2003 (gmt 0)

10+ Year Member



mod_gzip will check that the requesting browser can handle receiving gzipped content...

on my site, i saw about 60% savings in size of transmited content... however, i was experiancing problems and removed mod_gzip in case it was the culprit since the problems appeared soon after installing it... i'm still not sure and have a few oter suspicions but no real way of validating any of them ;(

dmorison

9:57 am on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would be careful with gzip if you're a high traffic site on a low powered server; I can imagine processor utilisation taking a hit...

wkitty42

11:17 pm on Sep 5, 2003 (gmt 0)

10+ Year Member



please define "high traffic site" and "low powered server" :)

i'm definitely not operating a site that everyone on the web is interested in though i do get quite a few folk coming by to download available files... especially the new games and such... other than that, my content is fairly diverse... links to space oriented stuff with a news feed, info and links about a hobby network that was extremely popular before the internet was so accessible, local pics of flood waters, a few pages of links to things that i've been interested in over the years and such... mostly, my site is a hobby and personal site... my worst traffic is the files leeches but i keep them capped at about 1K/sec each and only one connection to a file at a time to keep them from opening 50 pulls for the same file at different spots and trying to pul it down 50 times faster ;)

in any case, the files are all already zipped, rared or otherwise compressed or outside the parameters assigned for mod_gzip... i've also thought of pregzipping the content pages and having them there so that mod_gzip doesn't have to zip them on the fly... it says that it'll update the gzipped version of the raw version is different...

maybe this portion of the thread should be in another area? possibly web site issues or whatever it is called?

Xuefer

3:44 am on Sep 7, 2003 (gmt 0)

10+ Year Member



to wkitty42:
what problem? can u give more detail?

amznVibe

4:33 am on Sep 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mod_gzip barely takes any cpu cycles at the default settings and is a well proven technology (hint: Google uses it)

There are many threads around here talking about it.

[sourceforge.net...]

(if Brett was using it, the front page would go from 36712 to 6659 bytes, cutting 56k modem transfer time from 9 seconds to under 2)

note that you can control mod_gzip behavior very nicely though htaccess or httpd.conf

Compworld

2:09 pm on Sep 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks guys for the info. I appreciate it.

CompWorld

killroy

2:12 pm on Sep 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well I'm running a few 10s of 1000s of pages for several 100s of pageviews per day through apache, my own SLOW scripting language and GZIP and rarely breach 5% CPU usage on a 1.4ghz athlon. Biggest bottlenecks are the db, hdd speed and ram. and gzip mostly just adds cpu usage.

Highly Recommended.

SN

wkitty42

10:15 am on Sep 25, 2003 (gmt 0)

10+ Year Member



xuefer,

sorry 'bout not getting back sooner... its hard to track down all the stuff i participate in with all the threads generated daily...

anyway, my server was locking up and mod_gzip was one suspect... it may have been scans or even another piece of errant software... sadly, i haven't had the time to put mod_gzip back in place and see if the lockups come back...