Help with Load Balancing problem!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
lonelywolf
Forum Commoner
Posts: 28
Joined: Tue Jun 10, 2008 6:15 am

Help with Load Balancing problem!

Post by lonelywolf »

I have 2 servers located at different locations. My purpose is when connection to 1st server's too much (such as 5000 connections), i want to redirect all queries to 2nd server. Can you help me? I think maybe there're solutions at both php code and system (such as install a software on server). My server is running linux.
Thanks for your help.
User avatar
maliskoleather
Forum Contributor
Posts: 155
Joined: Tue May 15, 2007 2:19 am
Contact:

Re: Help with Load Balancing problem!

Post by maliskoleather »

load balancing on the code level is usally not the best idea, because of the amount of processing power that's generally used to make that sort of determination.

Personally, I'd just set my DNS up as a round-robin, and have it rotate users out between the two servers.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Help with Load Balancing problem!

Post by Benjamin »

You can send selects to the slave, updates, inserts deletes to the master.
User avatar
lonelywolf
Forum Commoner
Posts: 28
Joined: Tue Jun 10, 2008 6:15 am

Re: Help with Load Balancing problem!

Post by lonelywolf »

astions wrote:You can send selects to the slave, updates, inserts deletes to the master.
which techniques do you use to implement slave/master model, thanks you all!
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Help with Load Balancing problem!

Post by VladSun »

maliskoleather wrote:lPersonally, I'd just set my DNS up as a round-robin, and have it rotate users out between the two servers.
+1
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply