This blog was until recently hosted on a Atom-based server standing in a closet in our apartment. We had 100 Mbit/s fiber connection with an ISP that allowed me to have my own server at home. But a month ago we decided to move to a house. The possibilities of Internet connections were not many, the choices were DSL or mobile. We actually went for the untested technology LTE for our home connection.
Needless to say, my server needed another home. So I decided to get a virtual server in The Cloud. After a lot of investigations I went for the Swedish Iaas City Cloud. I actually haven’t regretted it once since then. I got my server up and running in just a few minutes with OS (Ubuntu server) installed. The Internet connection is fast and even the smallest instance greatly outperforms the Atom server at the quite reasonable price 130:-/month (around $20).
What caught my eyes and is quite strange about their service is the pricing for bandwidth. I all instances 1000 GB/month is included, which is a quite generous amount. After those 1000 GB you have to pay 0.3:-/GB ($0.045). This means that if you use 1000 GB during one month the cost of the server is 130:-/~$20. If you use 2000 GB during one month the cost goes up to 430:-/~$66, which is more than three times as much. This, of course, makes the server extremely sensitive to the Slashdot effect.
My remedy for this was the following. Spending 1000 GB every month means that you will be spending Mbit per second. So what I wanted to do was to limit the bandwidth usage of my Apache web server to 1 Mbit per second (to stay on the safe side). So I installed the Debian package libapache2-mod-bw. This is a bandwidth limiting module for Apache. In the file /etc/apache2/conf.d/bw I entered the following lines:
BandWidthModule On ForceBandWidthModule On BandWidth all 125000
This means that the bandwidth limiting was enabled for all virtual hosts, and limits the bandwidth to 125 kB (1 Mbit) per second. Server latencies for single requests are still as low as they were before and fetching smaller files still is fast enough. In fact, for just surfing this site, I haven’t noticed any difference. However, I am protected from the much feared Slashdot effect.