LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Apache + MySQL solution for online tests!!

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Apache + MySQL solution for online tests!!
From: Joseph Mack NA3T <jmack@xxxxxxxx>
Date: Fri, 22 Dec 2006 23:43:50 -0800 (PST)
On Sat, 23 Dec 2006, Roshan Sumbaly wrote:

Sir,
I am new to this field of load balancing and would require some help. We
have a PHP + MySQL based online exam software which conducts simple online
exams (in the form of Multiple Choice Answers). The software uses MySQL
backend and Apache web server. We had a mock test and realised that the
minute the number of students logging in increased to beyond 30, the
computer became slow and finally couldn't withstand it. Beyond 30 students
sitting at once the PHP pages failed to load and students couldn't log in.
Luckily this was the mock exam!!

I have not setup any software like this, but I'm suprised to hear of the poor response. I expect students are only clicking once a minute or so, requiring the computer to handle a click every 2 secs.

We also heard about DNS Load Balancing. Will this help?*

One of the developers here proved this was worthless 10yrs (or more ago). Some commercial setups are using fast DNS, but then they control the DNS server.

The issue* is we
don't want a student's test answers to be stored in various computers. It
should be that once a student connects to one server, he should be on that
server itself.

yes. have a persistent https connection.

(We don't mind replicating all the databases of
Questions/Answers as well as students' info on all the server computers)

If DNS load balancing is not the solution, then is LVS the right answer?

I don't know if it's the right answer, but it will do what you want.


If
yes, which LVS (we went through the site to find various versions of LVS
(LVS- NAT or LVS-TUN or LVS-DR?).

It's like asking which is best, a Chevy or a Ford? They both get you to work and let you do your shopping. Set up a simple (2 realservers, 1 director) LVS-NAT, and an LVS-DR using the instructions in the mini-HOWTO and see which one you'd rather manage.

We have Red Hat Linux 9 installed on the computers. Will LVS work with them?

yes. (LVS should work with any distribution of Linux).

PS : I am a student in my 3rd year and have taken up an elective (in
college) of implementing "New Load Balancing Algorithms". Could anyone
please mention a framework/API on which I could implement these new "load
balancing" algorithms written by my Sir?

In LVS the load balancing algorithm is in the scheduler. There's a section in the HOWO on writing your own scheduler. Also look at feedbackd for dynamically controlling the loadbalancing. For LVS a new scheduler comes about when someone sees that something isn't working. I thought that lc and rr were all we'd need until Thomas Proell realised that with squids you always wanted a client going to the squid that had the content you wanted. There's not much point in implementing a new algorithm, unless you have a need for it.

Joe
--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

<Prev in Thread] Current Thread [Next in Thread>