Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , I am working on load balancing ;
i already calculate the response time of all my servers in every 3 s
,while i am using round-robin,how to root the client's requests to the server with lowest response time? I just want to do this in case one of the servers is getting slow,so i can reduce its load.

and thank you again
Please help me
Thanks ^__^

What I have tried:

i thought about changing the priority dynamically but the rooter should restart every time to apply the new configuration in app.config
Posted
Updated 3-Aug-17 21:45pm
v4
Comments
virusstorm 3-Aug-17 13:07pm    
Why is load balancing in quotes? Did you build a custom piece of software to do the load balance? Is the load balancer an appliance, if so, what kind?

I suggest going back and editing your question to give more details of your setup and application architecture to get a solution to your problem.

In general, you typically buy an appliance to load balancing (such as an F5 as an example) or setup a software one such as Microsoft NLB. The appliance or software monitors response times and number of request sent to each node in your load balance pool. Based on this and other various statistics, you can configure it to send traffic to the least busiest node. How to do this specifically depends on what you are using to load balance traffic.

1 solution

As I see there are two ways...
One - to become a proxy between the client and the server - in this case you can measure the response time and decide which server is the fastest and use in the next round... While it is possible I would not use it as all that proxy thing is fairly complicated and has performance penalty..
Two - use a performance counter (PerformanceCounter Constructor (String, String, String, String) (System.Diagnostics)[^]) - maybe there is one already, or you can write your own (How to: Create Custom Performance Counters[^]) - to check what is the last/average response time of each server and pick the best... I would recommend this one...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900