Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

There are 10 servers of a particular organization . Give some load-balancing algorithm for it. Also consider a case where 1 of the server takes 10 sec to process a request and other takes only 1 sec. So, how will you manage this bottleneck?

share|improve this question
    
I have noticed the interview-questions tag. Do you need to provide an exact solution for the problem, or it's just a question to assess logical and reasoning skills? – Máté Gelei Jul 24 '12 at 11:50
    
I guess it was for assesing the logical skills but I want to know about the practical situation. – L.ppt Jul 24 '12 at 11:53

There are several ways of doing so but one of the best way is LOAD BALANCING BY COST. In this type of balancing we assign a cost to each connection from client to server on the basis of the distance between them, policies of sub-networks between them, medium of data transmission between them etc. and after doing so we try to relocate/refer the connections to that server which gives the overall minimum cost of the connections.

share|improve this answer
    
of course,the traffic on the server is also one of the most essential factors to determine the cost of the connections. – the xtreamist Jul 24 '12 at 12:02
    
Since, the question just provides 2 parameters in terms of processing times, I am not sure if this answer is what is expected even in the practical sense. – Guru Devanla Jul 24 '12 at 17:53

May be a simple solution is: Out of every 10 tasks, assign the 1st one to the server that takes 10 sec. The next 9 tasks goes to the server that takes 1 sec.

Of course, here I assume tasks are coming in at 1 sec intervals as an assumption. With that assumption and above approach both the servers are fully utilized.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.