> > > Use your LB module . Just put it in your project's META-INT/dubbo/* path > > > AND you can add any logic u want > > > PS. add this config file to .gitignore file > > > Does this solve your problem? > > > > > > Do you mean this: > > http://dubbo.apache.org/en-us/docs/dev/impls/load-balance.html ? > > When I study the inteface LoadBalance, the only method is: > > select(List invokers, URL url, Invocation invocation) > > So I need to select a inoker from the paramerter invokers, right? > > But I can't find any property related to provider's IP in this parameter. > > Could you shed some light on it? Thanks. > > Yes ,i think in your case , you can simply select a invoker. > > `foreach invokers as invoker : check invoker.getUrl if match your IP choose > it else ignore `
Thank you for help. It works. But there're bugs in the document:http://dubbo.apache.org/en-us/docs/dev/impls/load-balance.html META-INF |-dubbo |-org.apache.dubbo.rpc.cluster.LoadBalance I put the new load balance settings in above file, but it can't find the rule, when I change the file name portion from org.apache to com.alibaba, it works. And, I need to start two instances of providers to make dubbo enable load balance, otherwise it'll just ignore it. [ Full content available at: https://github.com/apache/incubator-dubbo/issues/3465 ] This message was relayed via gitbox.apache.org for [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
