<replica-groupid="ReplicatedAdapter">
<load-balancingtype="adaptive"load-sample="5"n-replicas="2"/>
</replica-group>
|
<icegrid>
<applicationname="Ripper">
<replica-groupid="EncoderAdapters">
<load-balancingtype="adaptive"/>
<objectidentity="EncoderFactory"type="::Ripper::MP3EncoderFactory"/>
</replica-group>
<server-templateid="EncoderServerTemplate">
<parametername="index"/>
<parametername="exepath"default="/opt/ripper/bin/server"/>
<serverid="EncoderServer${index}"exe="${exepath}"activation="on-demand">
<adaptername="EncoderAdapter"replica-group="EncoderAdapters"
endpoints="tcp"/>
</server>
</server-template>
<nodename="Node1">
<server-instancetemplate="EncoderServerTemplate"index="1"/>
</node>
<nodename="Node2">
<server-instancetemplate="EncoderServerTemplate"index="2"/>
</node>
</application>
</icegrid>
|
使用 adaptive 的負載均衡,咱們已經解決了 介紹 replica groups 時候所喪失的能力。咱們如今選擇最少負載的 adapter,不須要改變client 端。 html
http://note.youdao.com/share/web/file.html?id=9056da95153eea832334a8a64940550b&type=note node