Archive for the ‘ General ’ Category

Nginx, Varnish, HAProxy, and Thin/Lighttpd

Over the last few days, I’ve been playing with Ruby on Rails again and came across Thin, a small, yet stable web server which will serve applications written in Ruby.

This is a small tutorial on how to get Nginx, Varnish, HAProxy working together with Thin (for dynamic pages) and Lighttpd (for static pages).

I decided to take this route as from reading in many places I found that separating static and dynamic content improves performance significantly.

Nginx

Nginx is a lightweight, high performance web server and reverse proxy. It can also be used as an email proxy, although this is not an area I have explored. I will be using Nginx as the front-end server for serving my rails applications.

I installed Nginx using the RHEL binary package available from EPEL.

Configuration of Nginx is very simple. I have kept it very simple, and made Nginx My current configuration file consists of the following:

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main '$remote_addr - $remote_user [$time_local] $request "$status" $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';

    sendfile on;
    tcp_nopush on;
    tcp_nodelay off;

    keepalive_timeout 5;

    # This section enables gzip compression.
    gzip on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    # Here you can define the addresses on which varnish will listen. You can place multiple servers here, and nginx will load balance between them.
    upstream cache_servers {
      server localhost:6081 max_fails=3 fail_timeout=30s;
    }

    # This is the default virtual host.
    server {
        listen 80 default;
        access_log /var/log/nginx/access.log main;
        error_log /var/log/nginx/error.log;
        charset utf-8;

        # This is optional. It serves up a 1x1 blank gif image from RAM.
        location = /1x1.gif {
          empty_gif;
        }

        # This is the actual part which will proxy all connections to varnish.
        location / {
          proxy_pass http://cache_servers/;
          proxy_redirect http://cache_servers/ http://$host:$server_port/;

          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
}

Varnish

Varnish is a high performance caching server. We can use Varnish to cache content which will not be changed often.

I installed Varnish using the RHEL binary package available from EPEL as well. Initially, I only needed to edit /etc/sysconfig/varnish, and configure the address on which varnish will listen on.

DAEMON_OPTS="-a localhost:6081 \
             -T localhost:6082 \
             -f /etc/varnish/default.vcl \
             -u varnish -g varnish \
             -s file,/var/lib/varnish/varnish_storage.bin,10G"

This will make varnish listen on port 6081 for normal HTTP traffic, and port 8082 for administration.

Next, you must edit /etc/varnish/default.vcl to actually cache data. My current configuration is as follows:

backend thin {
  .host = "127.0.0.1";
  .port = "8080";
}

backend lighttpd {
  .host = "127.0.0.1";
  .port = "8081";
}

sub vcl_recv {
    if (req.url ~ "^/static/") {
        set req.backend = lighttpd;
    } else {
        set req.backend = thin;
    }

    # Allow purging of cache using shift + reload
    if (req.http.Cache-Control ~ "no-cache") {
        purge_url(req.url);
    }

    # Unset any cookies and autorization data for static links and icons, and fetch from catch
    if (req.request == "GET" && req.url ~ "^/static/" || req.request == "GET" && req.url ~ "^/icons/") {
        unset req.http.cookie;
        unset req.http.Authorization;
        lookup;
    }

    # Look for images in the cache
    if (req.url ~ "\.(png|gif|jpg|ico|jpeg|swf|css|js)$") {
        unset req.http.cookie;
        lookup;
    }

    # Do not cache any POST'ed data
    if (req.request == "POST") {
        pass;
    }

    # Do not cache any non-standard requests
    if (req.request != "GET" && req.request != "HEAD" &&
        req.request != "PUT" && req.request != "POST" &&
        req.request != "TRACE" && req.request != "OPTIONS" &&
        req.request != "DELETE") {
        pass;
    }

    # Do not cache data which has an autorization header
    if (req.http.Authorization) {
        pass;
    }

    lookup;
}

sub vcl_fetch {
    # Remove cookies and cache static content for 12 hours
    if (req.request == "GET" && req.url ~ "^/static/" || req.request == "GET" && req.url ~ "^/icons/") {
        unset obj.http.Set-Cookie;
        set obj.ttl = 12h;
        deliver;
    }

    # Remove cookies and cache images for 12 hours
    if (req.url ~ "\.(png|gif|jpg|ico|jpeg|swf|css|js)$") {
        unset obj.http.set-cookie;
        set obj.ttl = 12h;
        deliver;
    }

    # Do not cache anything that does not return a value in the 200's
    if (obj.status >= 300) {
        pass;
    }

    # Do not cache content which varnish has marked uncachable
    if (!obj.cacheable) {
        pass;
    }

    # Do not cache content which has a cookie set
    if (obj.http.Set-Cookie) {
        pass;
    }

    # Do not cache content with cache control headers set
    if(obj.http.Pragma ~ "no-cache" || obj.http.Cache-Control ~ "no-cache" || obj.http.Cache-Control ~ "private") {
        pass;
    }

    if (obj.http.Cache-Control ~ "max-age") {
        unset obj.http.Set-Cookie;
        deliver;
    }

    pass;
}

HAProxy

HAProxy is a high performance TCP/HTTP load balancer. It can be used to load balance almost any type of TCP connection, although I have only used it with HTTP connections.

We will be using HAProxy to balance connections over multiple thin instances.

HAProxy is also available in EPEL. My HAProxy configuration is as follows:

global
  daemon
  log 127.0.0.1 local0
  maxconn 4096
  nbproc 1
  chroot /var/lib/haproxy
  user haproxy
  group haproxy

defaults
  mode http
  clitimeout 60000
  srvtimeout 30000
  timeout connect 4000

  option httpclose
  option abortonclose
  option httpchk
  option forwardfor

  balance roundrobin

  stats enable
  stats refresh 5s
  stats auth admin:123abc789xyz

listen thin 127.0.0.1:8080
  server thin 10.10.10.2:2010 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2011 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2012 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2013 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2014 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2015 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2016 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2017 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2018 weight 1 minconn 3 maxconn 6 check inter 20000
  server thin 10.10.10.2:2019 weight 1 minconn 3 maxconn 6 check inter 20000

Thin

My Thin server is actually run on a separate Gentoo box. I installed Thin using the package in Portage.

To configure Thin, I used the following command:

thin config -C /etc/thin/config-name.yml -c /srv/myapp --servers 10 -e production -p 2010

This configures thin to start 10 servers, listening on port 2010 to 2019. If you want an init script for Thin, so you can start it at boot, run

thin init

This is will create the init script, and you can set it to start up at boot using the normal method (rc-update add thin default or chkconfig thin on).

You should now be able to access your rails app through http://nginx.servers.ip.address

Next, we must configure the static webserver.

Lighttpd

I decided to go with Lighttpd as it is a fast, stable and lightweight webserver which will do the job perfectly with little configuration.

You could also use nginx as the static server instead of using lighttpd, but I decided to separate it.

I decided to use the package from EPEL for Lighttpd, and found that most of the default configuration was as I wanted it to be. The only thing I needed to change was the port and address the server was listening on:

server.port = 8081
server.bind = "127.0.0.1"

And thats pretty much it! Now you just have to dump any static content into /var/www/lighttpd/ (the default location that the Lighttpd package in EPEL is configured to use) and reference any static links using “/static/document_path_of_file”, for example if I put an image into /var/www/lighttpd/images/ called “bg.png”, I can access it using http://servers_hostname/static/images/bg.png.

I have not really done any performance tests onto how well this works, and there are probably many things which I could have done better. This is the first time I made any attempt HTTP performance tuning, and so I am always looking for feedback or tips on how to make this better, so please do contact me if you have any suggestions! :)

Server Upgrade / Disk Failure

Last month I had a disk failure which caused most of my data to become inaccessible which is the main reason for my blog being down for so long.
I have three 1TB hard drives in a LVM VG…. without any RAID. This means if one drive fails, it is very unlikely I will be able to recover any data. It was very stupid of me, and I regret it VERY much. :(
The drives I was using in the LVM VG were Seagate Barracuda 7200.11 1TB (ST31000333AS) drives.
I originally bought these drives January 2009, but since then I’ve had multiple issues with the drives and so I don’t actually have the drives I originally bought, I sent them back for replacement as they all showed sign of failure sooner or later. Luckily, I was able to catch those failures pretty early, thanks to “SMARTmon Tools”. This time I was unable to do so, as I upgraded my SATA controller to a Adaptec 2820SA which does not allow SMART commands to be passed through to the drive.
After a bit of Googling, I discovered that there have been quite a few reports of these drives failing, unfortunately in January these reports were not available.
This frustrated me quite a bit, as not only did I lose 500GB worth of important data, I will now have to scrap these drives and buy new drives if eBuyer or Seagate is unwilling to give me a different model of 1TB drives – I don’t think it should be an issue for them to give me the Barracuda 7200.12 which seem to have much better reports, but I don’t think they will agree to this.
At the moment, I’ve sent the drives to Seagate’s i365 Data Recovery service, and they are building a list of files which they will be able to recover.
During the time the drives failed, I decided it would be a good idea to upgrade my server too. My new servers specs are as follows:
Intel Quad-Core Xeon E5405 2 GHz
2×4 GB DDR2 PC2-5300 RAM
Tyan Tempest i5100X (S5375)
Norco RPC-4220 case
The Norco RPC-4220 case is a 4U rack-mountable server case and has 20 hot-swappable hard drive bays, which allows quite a of room for storage expansion. When I first powered on the machine, I noticed that the fans which cool the hard drives are amazily loud and so switch them for quiter ones (relax! they are quck provide enough air flow to cool six drives!). The case comes with five SAS/SATA backplanes, which have a Mini-SAS connector. As I don’t have a SAS controller, I had to buy Mini-SAS reverse breakout cables which allowed me to connect the backplanes to my standard SATA cards. This was quite a pain, as I had no idea that there are two types of Mini-SAS to SATA cables, one for Mini-SAS on Backplane side to SATA on the controller, like I needed, and SATA on the backplane, to Mini-SAS on the controller. It was a pain that I discovered this after I had already bought the wrong cables.
The Tempest i5100X supports two Quad Core XEON processors, although I only bought one for the time being. The board also takes upto 32GB worth of RAM which also allows alot of room for expansion.
Thanks to this upgrade, I was finally able to play with XEN’s full-virtulization (HVM) functionality as the E5405 has the Intel VT-x extension.
When I get my drives back from i365, I will be sure to use RAID5 on the drives AND make regular backups….. although I haven’t really found a feasible solution (price wise, and time to actually do it) for backing up 500GB worth of data, so if anyone has any suggestions, please let me know!
I have looked at Bacula, and I really like it, but I still need media onto which I can backup the data.
I have lost my trust in hard drives for keeping my backups, and burning to DVDs or Bluray would not be very feasible as I would require 63 dual layer DVDs or 10 dual-layer bluray discs to backup 500GB worth of data, and both are not very reliable either (they are easily scratched!).
I also looked at online backup services, but this too I think is not a feasible idea as backing up 500GB over a connection with only 1.3mbit upload would take way too long.

Last month I had a disk failure which caused most of my data to become inaccessible which is the main reason for my blog being down for so long.

I have three 1TB hard drives in a LVM VG…. without any RAID. This means if one drive fails, it is very unlikely I will be able to recover any data. It was very stupid of me, and I regret it VERY much. :(

The drives I was using in the LVM VG were Seagate Barracuda 7200.11 1TB (ST31000333AS) drives.

I originally bought these drives January 2009, but since then I’ve had multiple issues with the drives and so I don’t actually have the drives I originally bought, I sent them back for replacement as they all showed sign of failure sooner or later. Luckily, I was able to catch those failures pretty early, thanks to “SMARTmon Tools”. This time I was unable to do so, as I upgraded my SATA controller to a Adaptec 2820SA which does not allow SMART commands to be passed through to the drive.

After a bit of Googling, I discovered that there have been quite a few reports of these drives failing, unfortunately in January these reports were not available.

This frustrated me quite a bit, as not only did I lose 500GB worth of important data, I will now have to scrap these drives and buy new drives if eBuyer or Seagate is unwilling to give me a different model of 1TB drives – I don’t think it should be an issue for them to give me the Barracuda 7200.12 which seem to have much better reports, but I don’t think they will agree to this.

At the moment, I’ve sent the drives to Seagate’s i365 Data Recovery service, and they are building a list of files which they will be able to recover.

During the time the drives failed, I decided it would be a good idea to upgrade my server too. My new servers specs are as follows:

The Norco RPC-4220 case is a 4U rack-mountable server case and has 20 hot-swappable hard drive bays, which allows quite a of room for storage expansion. When I first powered on the machine, I noticed that the fans which cool the hard drives are amazily loud and so switch them for quieter ones (relax! they are quck provide enough air flow to cool six drives!). The case comes with five SAS/SATA backplanes, which have a Mini-SAS connector. As I don’t have a SAS controller, I had to buy Mini-SAS reverse breakout cables which allowed me to connect the backplanes to my standard SATA cards. This was quite a pain, as I had no idea that there are two types of Mini-SAS to SATA cables, one for Mini-SAS on Backplane side to SATA on the controller, like I needed, and SATA on the backplane, to Mini-SAS on the controller. It was a pain that I discovered this after I had already bought the wrong cables.

The Tempest i5100X supports two Quad Core XEON processors, although I only bought one for the time being. The board also takes upto 32GB worth of RAM which also allows alot of room for expansion.

Thanks to this upgrade, I was finally able to play with XEN’s full-virtulization (HVM) functionality as the E5405 has the Intel VT-x extension.

When I get my drives back from i365, I will be sure to use RAID5 on the drives AND make regular backups….. although I haven’t really found a feasible solution (price wise, and time to actually do it) for backing up 500GB worth of data, so if anyone has any suggestions, please let me know!

I have looked at Bacula, and I really like it, but I still need media onto which I can backup the data.

I have lost my trust in hard drives for keeping my backups, and burning to DVDs or Bluray would not be very feasible as I would require 63 dual layer DVDs or 10 dual-layer bluray discs to backup 500GB worth of data, and both are not very reliable either (they are easily scratched!).

I also looked at online backup services, but this too I think is not a feasible idea as backing up 500GB over a connection with only 1.3mbit upload would take way too long.

The Official Myers-Briggs Personality Test

Shhh! I was bored! – It describes me pretty well though imo :)


Your result for The Official Myers-Briggs Personality Test…

ISTP

1% Extraversion, 20% Introversion, 14% Sensing, 12% Intuition, 23% Thinking, 1% Feeling, 8% Judging and 14% Perceiving!

Introverted Intuition with Extraverted Thinking

Approximately 5.4% of persons in the United States are ISTPs.

Summary:

Tolerant and flexible, quiet observers until a problem appears, then act quickly to find workable solutions. Analyze what makes things work and readily get through large amounts of data to isolate the core of practical problems. Interested in cause and effect, organize facts using logical principles, value efficiency.

At Their Best

People with ISTP preferences carefully observe what is going on around them. Then, when the need arises, they move quickly to get to the core of a problem and solve it with the greatest efficiency and the least effort. They are interested in how and why things work but find abstract theories uninteresting unless they can quickly apply them. They often function as troubleshooters.

ISTPs resist regimentation and rules, thrive on variety and novelty, and enjoy the challenge of solving a new, concrete, extensive problem.

Characteristics of ISTPs

ISTPs use their Thinking primarily internally to see the essential structure underlying the facts. Their minds seem to work almost like computers, organizing data, reasoning impersonally and objectively. They make rational decisions based on a great deal of concrete data. ISTPs are likely to be

· Detached and objective critics

· Analytical and logical problem solvers

ISTPs are realists, focusing on what is and what can be done with it, rather than on theoretical possibilities. They are often creative at dealing with the immediate problems and good at hands-on tasks. ISTPs are likely to be

· Practical and realistic

· Factual and pragmatic

ISTPs are expedient and believe in economy of effort doing only what is needed with the least possible discussion and fuss. Their focus is on getting the desired results.

How Others May See Them

ISTPs are egalitarian and generally tolerant of a wide range of behavioruntil their ruling logical principles are attacked. At that point, they can surprise others by expressing their firm and clear judgments. ISTPs listen and seem to agree because they are not disagreeing; later, others may find the ISTP was analyzing and making internal judgments.

With their constant scanning for information and focus on results, ISTPs will change course readily if they see another, more efficient way. Because of this, others some- times have trouble “reading” them. They tend to be quiet and reserved, though they can be quite talkative in areas in which they have a lot of knowledge. Others usually see ISTPs as

· Adaptable, action-oriented risk takers

· Confident, independent, and self-determined

Potential Areas for Growth

Sometimes life circumstances have not supported ISTPs in the development and expression of their Sensing and Thinking preferences.

· If they have not developed their Sensing, ISTPs may have no reliable way of getting accurate data about the external world or of translating their thoughts into action.

· If they have not developed their Thinking, they may get caught up in the realities around them. and not take time to do the internal logical processing they need to make good decisions. Then their actions may be haphazard responses to immediate needs

If ISTPs do not find a place where they can use their gifts and be appreciated for their contributions, they usually feel frustrated and may

· Become cynical and negative critics

· Withdraw their attention and energy

· Postpone decisions

It is natural for ISTPs to give less attention to their non- preferred Feeling and Intuitive parts. If they neglect these too much, however, they may

· Overlook others’ emotional needs and values

· Not give sufficient weight to the impacts of their decisions on others

· Focus so intently on immediate results that they lose track of the long-term ramifications of their decisions and actions

Under great stress, ISTPs may erupt outwardly in inappropriate displays of emotion. The resulting explosive anger or hurt tearfulness is quite unnerving to others and embarrassing to the usually calm and controlled ISTP.


Take The Official Myers-Briggs Personality Test
at HelloQuizzy

PSP Video Encoding

I often use my PSP to watch Anime and Movies on the way to work, or any long trip on the train/bus.

I found Tristan’s Blog post which gives the settings required to make mencoder convert video to the perfect version for watching on the PSP.

To make mencoder hardcode subtitles into the video at the same time as it encodes for the PSP, just append -slang eng -alang jap to the command. This tell mencoder to use the english subtitles, and japaneese audio (Not required if the file only has one audio track).

PowerVault 120T DLT-7000 Autoloader

For the last month or so, I’ve been using Bacula to backup the important data on my machine/servers and my dads computer. Although it works great with my PowerVault 100T DDS4 drive, I got fed up of having to constantly change tapes every they got filled up.

To solve this problem I decided to buy a Dell PowerVault 120T DLT-7000 Autoloader from eBay.

I receieved the PV a few days ago, but I was unable to test it as I did not have the neccicary terminator or cable required to connect it to my server.

After looking on eBay, I found both items from a single seller (the same seller I bought the autoloader infact!), and I received both items in the post today.

I hooked everything up very excitedly, and found that the DLT-7000 drive in the PV-120T was faulty! :( The LCD displays “Drive POST Error”. I’ve emailed the seller of the autoloader, and I really hope he will be able to repair or send me a new one of these devices.

Western Digital 1TB Hard Drive

A few months ago, I bought a Western Digital 1TB Hard Drive (http://www.wdc.com/en/products/products.asp?DriveID=336) for my server.

Since every WD drive I have bought in the past has served me very well, I assumed this drive would do the same…. but VERY annoyingly, I just got an email from smartmon tools telling me that there are an increasing number of bad sectors on the drive! :(

eBuyer has agreed to replace the drive since it is still under warrenty, but the problem is that I have the drive in an LVM volume group, so backing up the data is a little difficult.

It would be easy if I had another 1TB Hard Drive to add to the volume group, the pvmove all the data off the broken one, but I do not have a spare 1TB drive, and eBuyer (naturally), didn’t agree to sending me the new drive before I give the old drive back to them.

I also have 1TB Seagate drive in the volume group, which is performing very well, so very reluctantly, I might just ask eBuyer if they would let me switch it for a Seagate one.

Oh well, I guess for now, my only option would be to buy another 1TB drive, move all the data onto that drive, remove the old drive from the VG, get it replaced, then if I feel brave enough, add the new one to the VG. I’ll have quite a large volume group if I do that (3TB!).

Speaking of which, if anyone has any tips for boosting LVM performance when using large volume groups, please tell me! :)

iPhone WordPress!

Out of boredom I decided to try out the WordPress application for iPhone. It seem quite useable :) .

Hackintosh!

So after my last blog post, I decided to try out OS X inside a virtual machine ….. but after four tries, I gave up and just wiped my hard drive and installed natively.

Installation went surprisingly well, and most of my hardware is “liked” by the hacked versions of OS X (I used iATKOS 5i). Everything that should be working, is working except for my sound card… which is partially working. I hear sound, but the front audio ports for headphones and microphones does not work, and neither does the back microphone socket, but I’m still quite happy with that considering OS X wasn’t designed to be run on my hardware (and apparently with some hacking, I can make those things work too).

So far I’ve been using OS X for two days, and I must say, I like it much more than I had expected.

My first computer was a Mac, and I used a Mac till OS 8.something (in 1999 my dad bought me a my first PC because Macs were, and still are quite pricy). I was originally quite reluctant to leave Mac OS, but eventually had to BUT I soon discovered Linux, and started using and loving it.

For the last 5/6 years I’ve been using Linux, and I only really used OS X two or three times at my Dad’s work place. I originally thought I would LOVE to have a Mac (with OS X), but a few days ago I changed my mind because I thought I had become too used to Linux (which I have!) and would not be able to use OS X to do everything I want.

I thought there would be lots of things that I would not like about OS X, but it turns out the list is actually a lot smaller than I thought.

There are a few things I don’t like about OS X, and some things I miss from Linux. For example:

  • I really hate the keyboard bindings. This is probably because I’m now used to Linux shortcuts etc. I managed to “fix” some of them (eg in the Terminal app I wanted page up/down to actually send the page up/down characters).
  • I STILL dislike iTunes, although it is much better than in Windows. I really miss MPD with gmpc.
  • I don’t really like the dock. This is probably one of the things that most people DO like, but I’m not really a fan of it.
  • I can’t seem to find a decent IRC client on it. X-Chat Aqua isn’t really quite as nice as it is on Linux, and Linkinus isn’t too good either in my opinion.
  • I don’t really like the fact that OS X doesn’t depend THAT much on log files. It does use them, but I don’t think the details it gives are always useful.
  • I kinda miss the ability to configure things from the command line. I don’t know if you can configure things from the command line in OS X, but from what I understand you can’t really do much system configuration from the command line except small hacks.

Overall, I like OS X, and will probably continue using it on my machine till I get a real Mac (hopefully in September).

Some of the things I like about OS X:

  • Undoubtably the thing I like most is how everything is so tightly integrated with each other. While this is also possible on Linux, it DOES need a lot of configuration to get it perfect. On OS X, it is all ready to go, out of the box. Linux is also heading that way, with things like d-bus interaction between apps has become more and more efficient, but not all apps take advantage of this yet.
  • I like the fact that everything looks the same, and isn’t “odd”. By this I mean there is no “KDE” look, or Gnome Look. Everything fits in fine with the UI. I know you can use special tools etc to make KDE apps fit into Gnome, and vice-versa, but again that requires configuration. Personally I didn’t ever bother doing that, although I didn’t really like how KDE apps didn’t fit into my Gnome desktop.
  • Close source applications work better on OS X than their Linux equivalents. For example Skype is on Linux and on Mac OS X, but the Mac version is MUCH more stable than the Linux version. I guess this is mainly due to all the sound systems that are available in Linux. Skype switched to ALSA recently from OSS, but now a lot of people want PulseAudio support too, or ESound support etc. There are too many choices I think, and I think that is causing a bit of chaos. This issue would probably be fixed a lot faster if Skype were open source, but I don’t think people should live in a dream world where everything is open source, sure it would be nice, but lets face it, thats never gonna happen. So in reality, the better choice will indeed be the one that works, and in my opinion, so far in OS X is the better choice.

On OS X, I’ve managed to actually have a pretty good quality conversation over Skype with my sister, which I haven’t been able to on Linux.

I don’t know if this makes me sound like I’m anti-Linux now, believe me I’m not! I LOVE Linux still (more than I like OS X!), in-fact I’m running it inside a VMware Fusion virtual machine right now and will wipe my machine and put Gentoo back on it as soon as I get a real Mac to sit beside my Gentoo machine.

I also thought I’d mention this: I know a lot of Linux users who say EVERYONE should use Linux, and there is no excuse for using Microsoft or Apple products. This goes to the people who think this way: You are all idiots :) .

Some people say Apple and Microsoft products should be avoided because they are buggy. Sure Windows IS buggy, and sure OS X probably has some bugs too (I haven’t found any yet!). BUT truthfully, can anyone say that Linux applications are bug free? The only difference is that you have the ability to fix the bugs yourself…. which is quite a useless ability if you are a normal user who doesn’t give a damn about how the internal works, and doesn’t have a clue what C++ is!

To be quite honest, A LOT of Linux applications have A LOT of bugs. NetworkManager is quite buggy, so I stopped using it and manually setup wpa_supplicant to connect to my wireless network, but I don’t think my Dad can do that! A normal user like my father needs GUIs to do everything, they are easier to use for someone who has no clue how to use a CLI (and doesn’t want to learn how to use it!). Naturally Linux IS becoming more and more user friendly, and I think there WILL be a point where I can safely install Linux on either of my parents computers, and not have to worry about them not knowing how to do something, but till that day comes I REALLY think it is pointless and ignorant for people to tell everyone to boycott Apple and Microsoft, and switch to Linux unless they are willing to understand the internals a little and figure out how to manually edit things from the CLI, which over 90% of the world’s population probably isn’t :) .

Besides… Apple products are really nice in my opinion, not very buggy and they work very well! (I love my iPhone <3!!!)

Lol like most of my posts, I wrote this while super sleepy so it probably makes no sense, oh well.

Astaro Mail Gateway

astaroI finally moved my email server back home!

For quite a while now, I’ve been using Google Mail to host my email for all my domains, but I’ve always felt that it wasn’t as “nice” as running your own server.

Some reasons I moved away from Google are:

  1. Although it might just be me, I’ve noticed that their IMAP server isn’t very stable. Quite often I haven’t been able to log in for quite a while.  (This was the main reason!)
  2. I _REALLY_ dislike the labeling feature of Gmail. It makes IMAP messy, same email in multiple folders (even though I don’t use lables!)
  3. I find the “Google Mail” folder annoying on IMAP, every time I get an email it shows up as a new email in my Inbox folder and Google Mail folder

Anyway, I setup Postfix with MySQL (I will be converting to LDAP soon) and noticed that I actually get quite a bit of spam.

From past experience, I knew that setting up a spam/antivirus filter requires quite a bit of maintinance, so I wanted a “lazy persons” solution.

After a bit of Googling, I came accross Astro Mail Gateway.

So I downloaded their VMware appliance and booted it up. It wasn’t as easy as I thought initially since the VMware image seems to have IPtables running which blocks access to the web interface, although I only had 4 hours sleep at that time so I could be wrong. So I had to log into the console, and disable IPtables temporarily, get into the web interface and configure the IP addresses to match my network (the default config uses 192.168.0.0/24, where as I use 10.1.0.0/16). After this it seems the UI added the various rules to IPtables to let me access everything properly.

After a bit more configuring I had a fully functional spam filtering proxy! :D

The only issue I’ve had with Astro so far is that it won’t accept my home user licence so in 28 days or so it will stop functioning :( , but hopefully the Astro support guys will reply to me and tell me how to fix that! :) .

What is really nice about Astro is that it makes nice graphs for you, and gives a lot of statistics such as Top Spamming countries, and Top malware reports (So far I’ve got 70% of my spam from the US!).

The only thing I wish Astaro Mail Gateway had is IPv6 support, but its not urgent I guess considering IPv6 isn’t used so widely yet.

Wii song

Just to be clear, I don’t really hate the Wii. I just found the song funny :P