linux.com — "The ubiquitous Linux, Apache, MySQL, and PHP/Perl/Python (LAMP) combination powers many interactive Web sites and projects. It's not at all unusual for demand to exceed the capacity of a single LAMP-powered server over time..."
Apr 24, 2006 View in Crawl 4
orbitalleaderApr 24, 2006
This a terrible article. It illustrates little about how to set up a scalable database server: the method described here will inevitable topple. Implementing this would be a very, very bad idea.It seems to have been dugg by Rose to illustrate his tech cred. But if he had any tech cred he would have seen what a horsecrap article this was.
colin7151Apr 24, 2006
DNS load balancing is pretty much the worst way to load balance around, for all the above reasons. I would HIGHLY suggest checking out Linux Virtual Server (linuxvirtualserver.org). Its pretty much a layer 4 switch and a completely customizable heartbeat service.LVS has been around a while and is definitely production quality. I work at a large community college and we have a LVS cluster in production for our web traffic. It works flawlessly, even under our highest load conditions (right after grades are released) which have around several hundred concurrent users.
crashieApr 24, 2006
The article seems to be intended for people who already knows how to set up a LAMP (unlike what the title says). If you already have a LAMP server and wants to know how to cluster it it's still nice reading (IMO). Too bad it didn't attempt to solve the session problem in a good way... This could have been done by changing the session handler to use MySQL instead (possibly using session_set_save_handler and then applying this to all files by using auto_prepend_file in php.ini).
thinkfr33lyApr 24, 2006
Does Linux offer something like Network Load Balancing in Windows?NLB is built into Windows Server and allows the machines to automatically determine if particular nodes are down and route traffic to an available machine. It also does far more intelligent load balancing via taking into account load on particular machines when determining which machine will handle the request.You can read more about NLB here: <a class="user" href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/clustering/nlbfaq.mspx">http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/clustering/nlbfaq.mspx</a>I've used NLB many, many times without major issues. I often setup web farms with NLB and use FRS (File Replication Services) to keep the various web sites in sync. Combine that with a SQL Server cluster and you don't have any single point of failure.Lately I've been using an F5 to do my load balancing, as it offers some greater flexibilty as far as determining an "up state" for a server, as well as making more specific rules on how to route traffic. For instance, a WAP application I have uses session state and therefore needs to be have sticky sessions. The F5 allows me to route traffic based on part of a URL (the part with the session ID) and have all traffic with that URL in it routed back to the original machine. Works very well.
skvngrxApr 24, 2006
yeah, but those are two very different articles.... One talks about a bad way to do DNS RR, and the other is full of step by step tweaks for a simple LAMP setup.
drn666Apr 25, 2006
@noorad: Your solution is to store an identifier and then incur compute time and a SQL query to retrieve the actual data from the database. My solution is to store the actual data on the client side, in either cookies or hidden fields, and then acting on it directly. When I said "use database offets to walk through cursors of result data." I meant rather than store lists of data (when paginating, for example) in a session, just requery the database.When you elimiate the need for sessions, you eliminate the need for session management. With 2 or 3 servers, synching session data between multiple boxes isn't that bad. With 20 servers, it gets annoying and slows down the whole system.
iyarychNov 16, 2009
If someone is still interested - new URL is <a class="user" href="http://www.linux.com/archive/feature/53578" rel="nofollow">http://www.linux.com/archive/feature/53578</a>