Load Balancing of PHP/MYSQL script without big code changes
- by DR.GEWA
Sorry for my Dummy Question, but...
I am making a script on php/mysql (codeigniter) and I am extremally interested in knowing if there is a way without big architectural changes of the script make a load balancing.
I mean, that for example now I will rent a medium dedicated server with 2GB ram, 200GB memory and good processor, and this will be enough lets say half year for the users which will come. But when they will become more and more, and as its a social net and at nights the server is waiting to have 500-1500 or 5000-8000 users online, I wander if there is a way for lets say just add second server with some config which will bear next pressure. After again one and so on... ????
<? if($answer=YES) {
how(??);
}
esle{
whatToDo(??);
}
?>
If there is no way, than maybe you could point to a easiest way of load balancing solution....
I will be extremally thanksfull if you can tell me for such purposes , should I move lets say to PostgreSQl or FireBird?
Which of them will be more easy in the future to handle ?
I am getting on the mysite.com/users/show/$userId page something like 60queries for all data... maybe too much, but anyway....after some optimization it can be 20-30....