Building a Linux Virtual Server 93
prostoalex writes "NewsForge (an OSTG site) has an article that discusses the details of building a cluster for a virtual server - an environment where one can add and remove machines as needed, to account for high-traffic Web site of intensive database application: 'The main advantage of using LVS is that unlike Microsoft network load-balancing clusters, the LVS allows you to add a node running any operating system that supports TCP/IP to the cluster.'"
PC's are not for networking (Score:4, Interesting)
First of all, the Linux Virtual Server project is a misnomer, because a Virtual Server these days means a virtualized operating environment similar to what is provided by VMWare, Xen, Linux Vserver, etc.
Second, IP Load Balancing is not new and is much better done by a hardware device such as Cisco CSM, Foundry ServerIron, Nortel Alteon, etc. These things boot in seconds, use ASICs, can process orders of magnitudes more packets per second than a Linux box can, have no moving parts (except for the fans), are aesily configured, can be set up in a fail-over configuration, speak routing protocols, etc, etc.
The Linux Virtual Server is a good project to tinker around with if you would like to understand load-balancing concepts better and do not have the $$$ for a hardware device, but I would not even consider designing a mission-critical solution using LVS instead of a hardware load-balancer.
I remember back in my ISP days we purchased a small provider with a few T1's all running on Linux-based routers. They had a tendency to lock up and were very awkward to manage for many reasons (e.g. upgrading the kernel was a risky procedure that required way more downtime than necessary) and we replaced them with real routers pretty quickly. I kinda suspect that Linux Virtual Server may be a similar type of experience - PC's just don't make good network devices for some reason.
Of course I'll probably get flamed for this comment...
Re:PC's are not for networking (Score:3, Insightful)
Re:PC's are not for networking (Score:3, Interesting)
Re:PC's are not for networking (Score:2)
cheap, reliable, fast - pick two.
Re:PC's are not for networking (Score:5, Insightful)
Re:PC's are not for networking (Score:1, Informative)
Also Nokia CheckPoint appliances are BSD!
My
OKAY WHO'S THE TARD WHO MODDED THIS FLAMEBAIT (Score:2)
Get this, the system that controlled card-key access was a *VERY* early F5 box that they had installed Windows on.
Re:Why open source is better. (Score:1)
Re:PC's are not for networking (Score:4, Informative)
Re:PC's are not for networking (Score:2)
Hmmm.
Re:PC's are not for networking (Score:1)
Re:PC's are not for networking (Score:3, Insightful)
I worked for a small ISP in the mid 90s and there were times, when in a pinch I had to setup a linux router or load balancer. And I got them to work. But there was always a lot of effort involved in getting it to work, and they were always precarious in operation. It was scarey to do upgrades. It was scarey to have hard drives fail.
It was alw
PC's are great for networking (Score:5, Informative)
Here's another approach: put Linux on a CompactFlash card instead of a hard drive. Keep the filesystem mounted read-only for normal operation. Test upgrades on a different computer and CF card. Upgrade by swapping out CF cards. If you can build a PC that doesn't need fans, then you've removed all moving parts from the equation. For smaller installations, single-board computers such as the Soekris [soekris.com] are very reliable. For larger installations, you can usually find a 1U system with the level of performance you need.
It was always just so much simpler to get a more expensive Cisco box in the long run due to its design, documentation, an performance.
It always depends on what you're doing, of course, and also what you're familiar with, but for my routing/firewalling/VPN/load balancing/ etc needs I've simply found Linux to be more flexible.
Re:PC's are not for networking (Score:2, Interesting)
That said, Linux Virtual Server is relatively easy to set up (for your average unix sysadmin), very reliable, fast and scalable. It is not inherently slower, less reliable or more dependent on moving parts than any hardware solution.
Re:PC's are not for networking (Score:2)
Check.
How did you benchmark this? What options where you using? I'd like to know. It's hard to argue with a vague blanket statement.
Check. It's trivially easy to put a Flash HDD in a PC.
Vague and debatable...
Check.
Check.
Re:PC's are not for networking (Score:1)
Re:PC's are not for networking (Score:2)
There are some intersting things you can do with linux as a router that you can't do with a hardware device though
It's a nice tool... (Score:2)
You could move the systems in and out of the cluster, but you could also move the OS install around on different hardware. Reliability through virtualization, it's a great thing.
Re:It's a nice tool... (Score:2)
As to load ballancing it's realy a toy when compared to the hardware boxes and as few year old arrowpoint (now cisco) boxes can be had for under 500 used that go faster than any linux box can think of with less
just to get it out of the way (Score:1, Funny)
Don't forget the importance of keepalived (Score:3, Informative)
What is Keepalived ?
So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
Re:Don't forget the importance of keepalived (Score:2)
Although the above-described virtual server setup (virtual server via NAT) can meet the performance requirements of many servers, the design is limited by the load balancer, which is a single point of failure for the whole cluster. However, you can eliminate this bottleneck by having multiple virtual servers, each connected to its own cluster of real servers, grouped together at a single domain name by round robin DNS.
Do two machine with failover before you do
Re:Don't forget the importance of keepalived (Score:2)
Re:Don't forget the importance of keepalived (Score:1, Offtopic)
Re:Don't forget the importance of keepalived (Score:1)
Dubious benefit? (Score:3, Insightful)
Re:Dubious benefit? (Score:2)
Re:Dubious benefit? (Score:2, Informative)
Re:Dubious benefit? (Score:2)
http://www.ultramonkey.org/papers/active_active/a
Sweet ! (Score:2, Funny)
Can you imagine!? (Score:1)
Actually... (Score:3, Interesting)
A "true" virtual server allows a cluster to be treated as a single machine, from the outside. However, the problem with LVS - and similar technologies - is that they don't do this very well. You often have a single entry point, which means that communication suffers from the bottleneck.
Ideally, what you want is for ALL the machines to be capable of receiving connections, so that connections can be striped across the farm,
Re:Actually... (Score:2)
You are correct. I fail to see what the big deal about this "Linux Virtual Server" is. First of all, it's a terribly chosen name. It seems to imply that you're running some type of "beowulf"-like cluster across multiple
Re:Actually... (Score:1)
Re:Actually... (Score:2)
Main website [unige.it]
GAMMA is a high-performance, low-latency, non-routable protocol, designed for clusters on a single LAN. The web page isn't that well written, but the code itself seems prety solid and is for the 2.6 kernels.
Database? (Score:2)
Re:Database? (Score:2)
I use a cluster for front-end logic (templating) and another for back-end logic. When I need to I'll do likewis
Built one. (Score:5, Insightful)
Re:Built one. (Score:1)
Therefore, it's been used with great success for HTTP, SMTP, IMAP, POP and so on.
What about transparancy? (Score:3, Interesting)
Personally, I am an advocate of pound for http/s load balancing, because its simple, has central logging, and handles ssl authentication itself (thereby keeping the back end servers simple)
Check it out:
http://www.apsis.ch/pound [apsis.ch]
Re:What about transparancy? (Score:1)
Re:What about transparancy? (Score:1)
Can pound send requests to backend servers on different subnets? That would be really cool.
Cluster is also a misnomer (Score:2)
DEC was leading this field in the late 1980s. (Score:2, Interesting)
Web servers...? where? (Score:2)
WLBS vs LVS (Score:4, Interesting)
How does LVS work if the balancer box fails?
Re:WLBS vs LVS (Score:1, Informative)
Re:WLBS vs LVS (Score:2, Informative)
my experience (Score:4, Insightful)
Now if someone came out with a good embedded linux running lvs with a nice web and cli interface, on solid state hardware, that was a decent amount cheaper than brand name equipment, put up a respectably proffessional looking site, and develop a loyal following, I'd consider it.
Re:my experience (Score:2)
Did you try just using DNS for load balancing? That's proven easy and reliable for me.
Did you support users website's too? How did you distribute their files among the different servers?
Re:my experience (Score:2)
Shared disks etc? (Score:2)
LVS isn't really an ideal system, the load balancer is bound to be the box that dies.
For a clustering project
http://www.linux-ha.org/ [linux-ha.org]
Re:Shared disks etc? (Score:1)
Re:Shared disks etc? (Score:1)
CmdrTaco are you there? (Score:2)
Nice, but in the real world (ie: Live on the WWW?) (Score:2, Insightful)
Re:Nice, but in the real world (ie: Live on the WW (Score:3, Informative)
whine whine; check out ultramonkey (Score:4, Informative)
http://www.ultramonkey.org/3/topologies/ [ultramonkey.org]
They even have an example where 2 machines act as both real servers and directors:
http://www.ultramonkey.org/3/topologies/sl-ha-lb-
It's a loadbalancer. (Score:2)
Want more intelligence (Score:2)
The problem is that some client requests are 'bigger' than others. If one of my machines got swamped by one o
Re:Want more intelligence (Score:2)
In a lot of cases, just using an algorithm that watches the number of connections on the servers will cover this... the swamped machine will end up with more pending connections, causing further requests to be balanced out to the other servers instead. U
Re:Want more intelligence (Score:1)
The wlc algorithm does have a small drawback though. When a new server is brought into the cluster, the wlc algorithm hammers the new server since it is starting out with zero connections compared to the active servers. The sed ove
Seriously? (Score:1)
*Yawn* Nothing to see here...
ps. burn karma burn!!!
Lame Article ... Excellent Software (Score:5, Informative)
You can easily avoid it becoming a single point of failure by using 2 directors with realtime syncronization and failover. Keepalived works well in this regard, giving subsecond failover performance, and even uses VRRP, Cisco's own hot standby protocol.
As for the level hardware that you need, a low end or older PC, such as a P3-700 for instance, can easily saturate a 100 mbit connection.
I used 2 x P4 2.4G systems. So for less than a fraction of the cost of even 1 hardware based boxes, I get hot standby and should be good for way more throughput than I can afford to provide.
The best feature that LVS brings to the table that the hardware based implementations miss out on, is flexibility. This software is being enhanced all the time and nothing is impossible with it. The same cannot be said for the hardware solutions.
Unfortuneately the article does not touch on any of the nice add-ons, like keepalived, ldirectord, etc., that make LVS a manageable solution. I know that they are trying to keep the examples simple, but showing servers being configured using solely ipvsadm is not too realistic for the average person and make it look undeservedly complicated, which it is not.
Give LVS a look an see if it might not give you the features you need without paying the big iron prices.
DC
Have i missed the point..... (Score:1)
Terrible article (Score:2)
From the very beginning it is obvious that the submitter has no clue about clusters, virtual servers and high-traffic environments.
>high-traffic Web site of intensive database application:
What the fuck is this sentence supposed to mean?
>'The main advantage of using LVS is that unlike Microsoft network load-balancing clusters, the LVS allows you to add a node running any operating system that support
Free, but not better (Score:2)
For instance, I know of a few that will have the return traffic sent directly from a "real server" directly to the client, rather than that roundabout trip to the scheduler and back out. This is great for offloading network congestion.
Re:Free, but not better (Score:1)
OpenSSI (Score:1)
OpenSSI [openssi.org] seems to be a good solution also