Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Startup Tip: Save bandwidth with Gzip (Eg: YC News can save upto 80% per page) (whatsmyip.org)
7 points by nreece on Aug 4, 2007 | hide | past | favorite | 15 comments


I'm a big advocate of gzipping the web. People should be aware that enabling gzip can cause some differences with page rendering due to the extra decompression step. It also increases CPU load on the server. There can be other minor issues too. No show-stoppers though.

Also, the percentage of compression savings should not be confused with the savings in load time. An 80% reduction in the size of the response does not mean an automatic 80% reduction in page load time.


Load on the CPU isn't that big of deal, when compared to the benefits.

1. By sending lesser data over the wire, you save on the number of round trips, thereby the page renders faster on the browser

2. the other one is the savings in bandwidth


good point.

PG: any particular reason you have not turned on compression? Is to get benefits of chunking?


How do you propose I turn on compression?


Mmm...I don't know how easy it'd be for you to get a precompiled C++ extension hooked into Arc. Something Guile-ish? But yeah, once that's done, just toss everything your server outputs into it.


mod_gzip & mod_deflate -- for html, css, js files + anything else with content disposition "text/html".

http://developer.yahoo.net/blog/archives/2007/07/high_perfor...


What web server do you run? (Apache on *nix Or IIS on Windows)


this one:

 (def serve ((o port 8080))
   (nil! quitsrv*)
   (ensure-dir logdir*)
   (let s (open-socket port)
     (prn "ready to serve port " port) (flushout)
     (= currsock* s)
     (after (while (no quitsrv*)
              (if breaksrv*
                  (handle-request s)
                  (errsafe (handle-request s))))
            (close s)
            (prn "quit server"))))


Perlbal (or something else) proxying requests would be a quick way to add support. Probably not worth the hassle on news.yc. No pages are that big and I doubt bandwidth usage is killing you.


ycombinator.com seems to be running Apache/2.2.4 on FreeBSD ( http://uptime.netcraft.com/up/graph?site=www.ycombinator.com ), in which case your best option is using the mod_gzip module: http://www.schroepl.net/projekte/mod_gzip/


What part of "this one" don't you understand? :)

www.ycombinator.com is not necessarily news.ycombinator.com.


Apache just got owned.


Does anyone know if Hunchentoot can be made to do compression?


currently this page is scoring an 82 on YSlow. Needs to make use of a CDN. Needs to add expires headers to external resources, and Needs to Configure ETags.


Really, what does YC need a CDN _for_? Just because YSlow says it doesn't mean it's actually a sane idea. They also say to turn off ETags, when what's actually good advice is to set up ETags in such a way that it works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: