负载均衡如何在Windows App Fabric缓存客户端中运行? [英] How load balancing works in Windows App Fabric cache client?

查看:71
本文介绍了负载均衡如何在Windows App Fabric缓存客户端中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在Windows服务器  App fabric缓存 客户端配置文件中有主机服务器列表时。
如何从客户端进行管理,这意味着它将始终采用如果没有连接可用性,或者是否有任何负载均衡的实现是
来分发请求,那么服务器和后退?


例如:


 < < dataCacheClient>

          < hosts>

            < host name =" Server1" cachePort =" 22233" />

            < host name =" Server2" cachePort =" 22233" />

           < host name =" Server3" cachePort =" 22233" />

          < host name =" Server4" cachePort =" 22233" />

         < host name =" Server5" cachePort =" 22233" />

        < / hosts>

        < securityProperties mode =" None"的ProtectionLevel = QUOT;无" />
$
    < / dataCacheClient>


使用上述配置,我的缓存客户端将始终转到"Server1"。如果有任何连接问题,则转到"Server2"。然后是"Server3" 那么作为一个失败的
结束或主机之间是否会发生相等的请求分配(负载均衡)?


谢谢提前。


JJ

解决方案


当我们在Windows服务器中有主机 服务器列表时,应用程序结构缓存 客户端配置文件。
如何从客户端进行管理,这意味着它将始终采用如果没有连接可用性,或者是否有任何负载均衡的实现是
来分发请求,那么服务器和后退?


例如:


 < < dataCacheClient>

          < hosts>

            < host name =" Server1" cachePort =" 22233" />

            < host name =" Server2" cachePort =" 22233" />

           < host name =" Server3" cachePort =" 22233" />

          < host name =" Server4" cachePort =" 22233" />

         < host name =" Server5" cachePort =" 22233" />

        < / hosts>

        < securityProperties mode =" None"的ProtectionLevel = QUOT;无" />
$
    < / dataCacheClient>


使用上述配置,我的缓存客户端将始终转到"Server1"。如果有任何连接问题,则转到"Server2"。然后是"Server3" 那么作为一个失败的
结束或主机之间是否会发生相等的请求分配(负载均衡)?


谢谢提前。


JJ


您可以针对群集进行操作,同时仅列出一个主机,但不建议这样做。客户端联系主机以获取路由表信息;缓存分布在主机上(尽管命名区域不是)。我不确定App Fabric使用的分区/分配算法的精确工作量
,但不是,它不会是主机之间的平均分配,因为状态不会在每个主机上重复。任何缓存对象的实时副本的单个实例一次只能存在于一个主机上。


在故障转移方面,您需要启用HA选项,该选项仅在Enterprise上可用主机。然后,您有一个实时副本和两个缓存数据的二级副本;丢失主机因此并不意味着丢失缓存数据,只要您使用
默认缓存+2主机或命名缓存+3主机,最小。 


&NBSP;


When we have list of host servers in Windows server App fabric cache client configuration file. how this will be managed from the client side, meaning it will always take first server and fall back if no connection availability or is there any load balanced implementation is there to distribute the requests?

eg:

 < <dataCacheClient>
          <hosts>
            <host name="Server1" cachePort="22233"/>
            <host name="Server2" cachePort="22233"/>
           <host name="Server3" cachePort="22233"/>
          <host name="Server4" cachePort="22233"/>
         <host name="Server5" cachePort="22233"/>
        </hosts>
        <securityProperties mode="None" protectionLevel="None" />
    </dataCacheClient>

With above configuration will my cache client always go to "Server1" and if there any connectivity issue then goes to "Server2" and then "Server3"  so on as a fail over or is there an equal distribution of request between hosts(load balancing) will happen?

Thanks in advance.

JJ

解决方案

When we have list of host servers in Windows server App fabric cache client configuration file. how this will be managed from the client side, meaning it will always take first server and fall back if no connection availability or is there any load balanced implementation is there to distribute the requests?

eg:

 < <dataCacheClient>
          <hosts>
            <host name="Server1" cachePort="22233"/>
            <host name="Server2" cachePort="22233"/>
           <host name="Server3" cachePort="22233"/>
          <host name="Server4" cachePort="22233"/>
         <host name="Server5" cachePort="22233"/>
        </hosts>
        <securityProperties mode="None" protectionLevel="None" />
    </dataCacheClient>

With above configuration will my cache client always go to "Server1" and if there any connectivity issue then goes to "Server2" and then "Server3"  so on as a fail over or is there an equal distribution of request between hosts(load balancing) will happen?

Thanks in advance.

JJ

You can operate against a cluster while listing only one host, though this is not recommended. The client contacts a host for routing table information; caches are distributed across hosts (though named regions are not). I am uncertain of the precise workings of the partitioning/distribution algorithms that App Fabric uses, but no, it will not be an equal distribution across hosts because state is not duplicated on every host. A single instance of a live copy of any cached object only lives on one host at a time.

In terms of failover, you need to enable the HA option, which is only available on Enterprise hosts. You then have a live copy and two secondary copies of your cached data; losing a host therefore does not mean losing cached data, so long as you are using the default cache + 2 hosts, or a named cache + 3 hosts, minimum. 

 


这篇关于负载均衡如何在Windows App Fabric缓存客户端中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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