Thursday, May 17, 2007

HTTP compression/deflate

Currently there are two implementation in http compression which are on Web server and also proxy server (web cache/cache engine). One of example of web server using http compression is Google.com, proven it's very fast (beside it's also simple:-). For Indonesia, www.detik.com also have implement http compression/deflate but many other famous website still didn't implement it. You can check wether the website implement http compression or not by using this tool

http://www.isapilabs.com/products/isapizip/compress.php

Just put the URL on the left side empty field.
I've configured apache using mod deflate. The text file size below is 5.1 MB

http://202.155.100.254/rfc.txt

When you download it, you will only consume 1.1 MB of bandwidth (didn't count the outgoing traffic). It's 4 time faster than without compression!

For proxy server implementation, it will reduce your internet bandwidth usage if you are an ISP/enterprise. Other than caching the content, proxy server will also compress the uncompressed data, and send it to its client. Squild will release the official feature of gzip content encoding on version 3.1.

Other than advantage of using http compression, you also need to know the compression will depend on type of data. If it's text or html files, it can compress up to 80% . But if it's an image, sometime compression file is higher than the original file. Most content of the website are image, movie, flash which are compressed already.

4 comments:

dikshie said...

http://sfc-cpu.ai3.net/~sirokuma/ht/Eval_HT.htm
http://sfc-cpu.ai3.net/~sirokuma/ht/Eval_HT_cache.htm

Ibrahim / Ibam said...

Kalo dari URL di atas, berarti ada server dan client. Agak ribet juga untuk sisi client dimana mereka harus install software/hardware-nya. Sedangkan http compression/deflate adalah standar HTTP 1.1, pakai browser keluaran tahun 99 bisa jalan juga.
Ada box yang melakukan kompresi, seperti keluaran riverbed, cara kerjanya mirip dengan yang di atas.

snydez said...

*gak ngerti (@_@)

tapi bukannya kalo ada proses compress/decompress, ada waktu yang kemakan?..
sehingga melambatkan proses?..

Ibrahim / Ibam said...

Yupe. Waktu kemaren baca2 waktu yang kemakan untuk compress sekitar 100ms-1000ms, tergantung dari besar-nya page dan algoritman compress-nya. Mungkin untuk tipe koneksi 100 Mbps ke internet nggak akan liat perbedaannya. Tapi untuk tipe koneksi dial-up atau tipe koneksi dengan volume based, compression akan "nendang".