You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by 徐靖峰 <ki...@foxmail.com> on 2019/02/23 16:41:08 UTC

回复:ConsistentHash LoadBalance中的解释:缺省只对第一个参数进行Hash运算是什么意思?

hi
i agree, let user extends themselves.


发自我的iPhone

------------------ 原始邮件 ------------------
发件人: LiZhenNet <li...@gmail.com>
发送时间: 2019年2月23日 23:23
收件人: dev <de...@dubbo.apache.org>
主题: 回复:ConsistentHash LoadBalance中的解释:缺省只对第一个参数进行Hash运算是什么意思?



Hi, jingfeng

I feel that the more complex features can be extended by the user, Dubbo
only provide the basic functions .

徐靖峰 <ki...@foxmail.com> 于2019年2月22日周五 下午8:58写道:

> Hi Xiaobo and Jason
>
> Sorry for that I give an inappropriate example — IP_HASH. My origin
> proposal was  that maybe the HASH KEY is not only can be method param. Not
> a serious problem.
>
> > 在 2019年2月22日,下午6:24,Jason Joo <hb...@163.com> 写道:
> >
> > Hi, Kitito
> >
> > I get your thought.
> > And the "IP" in our opinion is it a kind of addition (ip + parameters)
> or can be used alone (only ip)?
> >
> > Though IP + parameters may leads to unbalanced load between providers
> but i think it maybe still make sense according to the concept of
> ConsistentHash, while it will not if supporting only ip_hash.
> >
> > Hashed by IP maybe not a need so common i think.
> >
> > best regards,
> >
> > Jason
> >
> >> On Feb 22, 2019, at 15:19, 徐靖峰 <ki...@foxmail.com> wrote:
> >>
> >> Hi, Jason
> >>
> >> I know that the default logic of ConsistentHash LoadBalance is hashed
> by parameters, and dubbo provide the configuration
> >>
> >> <dubbo:parameter key="hash.arguments" value="0,1" />  to config the
> hash params
> >>
> >> <dubbo:parameter key="hash.nodes" value="320" /> to config virtual nodes
> >>
> >> My opinion is Dubbo can extend the hash key, not only the request
> method params.
> >>
> >> IP consistent hash is a such common requirement while Dubbo’s existing
> extension don’t include it, there is no need to let the users extend by
> themselves,
> >>
> >> A little change for Consistent Hash LoadBalance will support such
> function.
> >>
> >> Kitito
> >>
> >>> 在 2019年2月22日,上午11:39,Jason Joo <hb...@163.com> 写道:
> >>>
> >>> hi, moe
> >>>
> >>> I think what you mention is like "ip_hash" in NGINX or some other.
> >>>
> >>> ConsistentHashLB is hashed by parameters because a same logic will
> just act the same under the same parameters (which we call it
> reenterability). Adding other parameters will break it.
> >>>
> >>> While DUBBO provides the ability extending load balancers which makes
> it possible to implement kinds of balancers like ip_hash, app_version_hash
> or others.
> >>>
> >>> best regards,
> >>>
> >>> Jason
> >>>
> >>>> On Feb 22, 2019, at 11:00, 徐靖峰 <ki...@foxmail.com> wrote:
> >>>>
> >>>> Hi all
> >>>>
> >>>> I don’t think that ConsistentHashLoadBalancer should only load
> balance by the method param, maybe more configuration can provide to the
> user to achieve more type of dynamic hash parameters, such as hash by the
> requestIp, more request param.
> >>>>
> >>>>
> >>>
> >>
> >>
> >
>
>