I had a small hosting thingy, back in the day, which meant 4 servers were stashed in my bedroom. With servers i mean Pentium 3 desktops, almost earning their pension but not before I turned them into servers. You can see the trouble that one might have with such a setup. Spreading websites over too much servers, and those pieces of junk keep dying on me.
The solution?
Putting Linux on a router, so I can install Loadbalancing software on it. That way, the router will be the communcation point for
all websites. In this setup I could create a fileserver and use the rest for processing power. The software on the router divides all requests on the available hardware, thus creating a stable environment in which i can repear junk without downtime, and overall maintain a reasonable access time for the websites.
The router
I used the Edimax BR-6104K
router for this job. Main reasons are, the router costs 20 bucks, and there's already a Linux-based firmware installed on the machine, which makes the cross compiling a bit easier.
There are just two disadvantages:
- It doesn't have USB ports
- It's 5 bucks cheaper than the BR-6104KP that does
So we solder!
This router has the same PCB as the version
with the usb ports, which means that the connections are in place, and I can solder the ports on the router. The USB ports are required in this mod, since the 32MB storage on the router is not enough for my purposes. After all, this router will be balancing the load for a bunch of dying old servers.
So, what has to happen:
- I need to be able to plug in a USB stick; I need to solder the ports onto the PCB;
- Create a Linux distro to put onto the usb stick;
- Create a custom firmware to make the router boot from the usb stick.
So that's what I did
Fast, huh? I soldered the connections on the PCB (see image below). I chose the distro
Damn Small Linux for this little projects, mainly because it's small, and it can do what I want it to do. I installed the distro on the USB stick.
I then made a firmware that can boot from the first USB port. In case someone else wants to do this trick I'll put it at the download section later.
So when I got it to boot the Linux distro on the usb stick, I installed lightweight loadbalancing software on the thing, and spent an entire night hooking it up to my servers, along with creating a fileserver and making the other servers use it.