响应时间过滤器WCF,负载均衡, [英] Response time filter WCF, load balancing ,

查看:134
本文介绍了响应时间过滤器WCF,负载均衡,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行负载均衡;

i已经计算了每3秒内所有服务器的响应时间

,而我正在使用循环法,如何根据最低响应将客户端的请求发送到服务器时间?我只是想在其中一个服务器变慢的情况下这样做,所以我可以减少它的负载。



再次谢谢你

请帮帮我

谢谢^ __ ^



我尝试了什么:



i考虑动态更改优先级但是rooter应该每次重启在app.config中应用新配置

解决方案

我看到有两种方法......

一 - 成为代理在客户端和服务器之间 - 在这种情况下,您可以测量响应时间并确定哪个服务器最快并在下一轮中使用...虽然有可能我不会使用它,因为所有代理事情都相当复杂有性能损失..

两个 - 使用性能计数器( PerformanceCounter构造函数(String,String,String,String)(System.Diagnostics) [ ^ ]) - 也许已经有了,或者你可以写自己的(如何:创建自定义性能计数器 [ ^ ]) - 检查每个服务器的最后/平均响应时间是多少并选择最佳...我会推荐这个......

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

解决方案

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...


这篇关于响应时间过滤器WCF,负载均衡,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆