Coder Social home page Coder Social logo

一致性哈希负载均衡器中,可以使用服务名的哈希值作为选择服务端地址的 key 吗? about guide-rpc-framework HOT 4 CLOSED

snailclimb avatar snailclimb commented on June 12, 2024
一致性哈希负载均衡器中,可以使用服务名的哈希值作为选择服务端地址的 key 吗?

from guide-rpc-framework.

Comments (4)

mesmerizeBy avatar mesmerizeBy commented on June 12, 2024

同,我用这个项目起了多个服务端,然而一致性哈希负载均衡并没有生效
image
因为每次调用key都一样,所以全都落在同一个服务器上了
image
return selector.select(rpcServiceName);
这段代码确实应该加上其他调用信息,否则无法区别每次调用的状态,更别提负载均衡了

from guide-rpc-framework.

mesmerizeBy avatar mesmerizeBy commented on June 12, 2024

@Snailclimb
return selector.select(rpcServiceName);
建议一致性哈希这里可以加上调用参数信息
image

from guide-rpc-framework.

Snailclimb avatar Snailclimb commented on June 12, 2024

@Snailclimb
return selector.select(rpcServiceName);
建议一致性哈希这里可以加上调用参数信息
image

好的 👍 非常棒的建议

from guide-rpc-framework.

IThzf avatar IThzf commented on June 12, 2024

同,我用这个项目起了多个服务端,然而一致性哈希负载均衡并没有生效 image 因为每次调用key都一样,所以全都落在同一个服务器上了 image return selector.select(rpcServiceName); 这段代码确实应该加上其他调用信息,否则无法区别每次调用的状态,更别提负载均衡了

请问怎么开始多个服务端啊。NettyRpcServer类中端口是固定的,我先启动一个服务端,然后改变端口值,再启动一个,第一个服务端就会报错

from guide-rpc-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.