alangkah indah jika diri mampu mengisi setiap hembusan nafas dengan bertasbih..

Thursday, February 14, 2008

Save Your Hosting Bandwidth

You have got hosting account, it could be free or you bought it from a hosting company. Usually, when we talk about hosting account, you will be limited on bandwidth usage.

Bandwidth is amount of data transferred to and from server. For example, if you fetch RSS via your php file, your server request the url and after that the content of RSS delivered to the server. Your php file parses the RSS contents and display them to visitors, usually it's bigger. Every single character from html codes is also counted. And the biggest bandwidth eater is image, including background images.

Let's count in detail :
[RSS fetch request] + [RSS Content] + [Display RSS after parsed] and [html codes] + [background images] + [images in your post]
That's around 250KB.

You have 50 visitors / day, then in one day your website needs 12.5MB bandwidth / day. That's only for one page. If you have 10 pages, it will be 125MB / day. And don't forget spiders, they will index all your pages. Yahoo, Google, Adsense Bot come and 20KB/page * 10 * 3 = 600KB. RSS fetchers are also consuming your bandwidth, maybe around 400KB.

Let's sum them all. The result is 126MB per day. In 30 days, it will be 3780MB per month. So you need a hosting account with at least 4GB bandwidth. It may increase from time to time because you will add more pages and more visitors will come. That's just an example of 10 simple pages.

If your bandwidth is insufficient, visitors will have to wait until first date of the next month. That's terrible.



How to save bandwidth ?




  1. Host static files somewhere.
    Maybe using free host. You can search "free file hosting hotlink" or "free image hosting hotlink". There are many. Some of them have big storage and big allowed bandwidth you can use.

  2. Minimize inbound bandwidth
    When visitors come into your pages, your host spends outbond bandwidth. But when you fetch a RSS to be parsed by your php script, it uses inbound bandwidth. Especially when you schedule the fetching using cron or manual routine executes. If you think your visitors don't really need this, just remove that thing.



Happy saving !

0 comments: