Domain: linuxvirtualserver.org
Stories and comments across the archive that link to linuxvirtualserver.org.
Comments · 57
-
linux option
-
Linux Virtual ServerThe Linux Virtual Server Projects stuff might do the trick. I've used it for mailserver load balancing under medium load, and found it to be quite reliable, and easy to configure.
Without RedHat's Pirhana package.
;-) -
Load balancing may be what you want.Sounds like what you need is load balancing. There are a couple of good options for this.
The most popular these days is Layer 4 switching, which splits traffic as evenly as it can by monitoring the traffic on each pipe and directing requests accordingly. Linux Virtual Server can provide L4 switching capabilities from any old box you've got lying around.
Cisco also produces intelligent routers that can perform a sort of load balancing. Another option is a cache heirarchy using Squid. Squid can perform basic load balancing functions through it's parent/sibling relationship features.
Probably the best thing to do is set up LVS as an L4 switch to load balance between Squids (one squid per pipe), with the Squid sharing cached content information via cache digests.
Using an L4 switch + cache setup you will not only effectively share the bandwidth you will also get faster response times and less bandwidth usage overall.
http://www.linuxvirtualserver.org: Is the website to go to to find out about LVS. Also, the LVS kernel patches are now default in Red Hat 6.2 and above, plus Red Hat includes a web based administration frontend called Pirahna.
http://www.squid-cache.org: The Squid homepage.
Hope this helps.
-
One suggestion, use Roxen and LinuxVirtualServer
I have much experience in this area. I run a hosting company that has built High Availability into the design of the network. Using Linux Virtual Server as a load balancer allows us to scale very easily and provides maximum uptime and speed. For scalability, to add more resources, we simple add new servers behind the LVS. The LVS is a patch to the linux kernel, so it performs very fast and it provides a layer of security, since you can forward only the ports that you want to. LVS has several different algorithms for scheduling which server gets each request.
Also, using the Roxen WebServer provides great performance for dynamic content. Roxen has built in database features that perform very well, for instance, roxen will keep the database connection open for fast access. Roxen will also allow you to write scripts that run very quickly because they get read into the roxen process memory the first time they execute, and they never have to be called again (no forking). Or, you can get away from CGI all together and write your own roxen modules that run internally in the server and add functionality. Roxen also has it's own built in markup language called RXML that includes tags for doing database queries, creating images on the fly, and many more. Bottom line, Roxen gives you the ability to do anything you want with your web server, and still give you the best performance possible.
For example, we have developed smtp and pop servers that run internally in the web servers. Our design allows us to load balance all of our services. The mail server also uses mysql to manage all the messages, email accounts, and aliases. None of the email accounts actually have system user accounts on the servers (higher security and easier to manage). Also, we get better performance out of the mail server, because instead of writing to files for mailboxes, it writes to a database. This is much easier to manage in an environment such as the hosting industry where we must maintain many domains and users.
I was an Apache user for many years, until I discovered Roxen in mid 1998. And I would never go back. I have experience running thousands of web sites, using this concept, successfully.
I also know that Real Networks uses Roxen as there web server and development environment. Maybe, somebody from there can post a comment about there experiences as well. -
Here's how I do it...
For case 1, let's assume complete a complete linux front to back solution, with as much free (or mostly free) software as possible:
Needed Software Components:
1. Favourite Distro of Linux
2. MySQL or Postgres Database (personal pref is for MySQL... not going to get into the pros and cons here...)
3. Dynaminc Web-Scripting Language (PHP, Perl, whatever... personal pref for this kind of thing is PHP... again, I'm not debating at the moment...)
4. Linux Vitrual Server Project - very solid load-balancing from my experience. Don't know how it compares with the appliances on the market... but it's still solid.
5. HA/Redundancy software (Linux HA project isn't quite there... but they're getting close... there are some commercial packages available - one that's free for non-profit use - http://www.high-availability.com
Hardware:
NB: For maximum up-time I recommend systems with redundant hardware (backup power supplies, dual NICs, and RAID arrays)
1. Firewall/Load-balancer - preferably using HA/Redundancy software on two machines... Mirrored (RAID 1, right?) boot/system hot-plug drives are a good idea.
2. Web-farm - up to X systems (where X+1 breaks your budget... ;) ) load balanced with Virtual Server Project. For a reasonably heavy duty method of doing this relatively cheaply, see Cubix and their "density" series... up to 8 servers in a single box... with hot plug everything. RAID isn't as necessary here... as the systems themselves are effective your RAID...
3. Database system - again preferably an HA/Redundancy cluster for maximum availability. I recommend a mirrored boot/system disk again, with a RAID 5 array (or RAID 5+5 - mirrored RAID arrays) for speed and maximum availability... highest RPM drives you can afford can help here a lot for speed, too.
4. 100 BaseT Switch for maximum through-put. Personal preference is for Cisco but your budget dollars may vary.
5. I've mentioned RAID a couple of times... you can get SCSI and IDE raid these days (SCSI being more common)... the cheapest/fastest one I've see is from Raidzone - very nice, check them out (up to 15 - 40 GIG hot-plug IDE drives in one array, with a very high through-put). You can also do software RAID, taking a performance hit, but saving coin...
Case 2 assumes that you don't mind using some commercial stuff... and have a bigger budget:
1. Replace Virtual Server with an appliance. (Alteon, F5 and Cisco all make good products... presently my preference is with F5's BigIP.
2. Replace in born Linux firewall with Checkpoint's firewall-1 running under linux - or an appliance firewall, a Cisco PIX is very nice, and has very high though-put. The Nokia appliance running Checkpoint and a BSD bastardisation is quite nice. -
bah.
Redhat's piranha tools in 6.1 already allow clustering. The SGIs failsafe thing needs to work with a RAID drive array and does roughly the same thing as the linux virtual server project http://www.linuxvirtualserver.org/
SGIs stuff is available for download if anyone is interested at http://oss.sgi.com/ projects/sgilinux11/download/1.2-latest/ISO/ -
Re:Load balancing.The Linux Virtual Server project, at http://www.LinuxVirtualServer.org would be a good place to start.
You can get some really high performance out of it, you don't need anything better than for example a Pentium 100! and all the information you need on setting up a Virtual Server is on the site.
Cheers,
J