负载平衡器与服务发现?
希望每个人都过得好。
有一个问题让我很困惑。根据我的理解,我们正在使用服务发现来消除记忆微服务的URL和端口号的需求。就像我们有10个相同微服务的实例一样,我们只是通过服务发现只能通过名称访问它们。而且它已经是负载平衡的。正确的?
但是后来负载平衡器出现了。根据我的理解,我们再次做同样的事情,对吗?
我们正在使用负载平衡器再次消除了记住微服务的URL和端口的需求,对吗?
那我的问题是,使负载平衡器成为负载平衡器和服务发现的根本差异是什么?
赦免我的错误。这可能是我的错误理解。但是,如果您可以帮助,那将很棒。
Hope everyone is doing well.
There is a question that is bugging me a lot. According to my understanding we were using service discovery to eliminate the needs of remembering the URL and port number of the microservices. Like If we have 10 instances of the same microservices then we were just accessing them via just only the name via service discovery. And it was already load balanced. Right?
But then the load balancer came into picture. And according to my understanding we are again doing the same thing, right?
We are using the load balancer to again eliminate the needs of remembering URL's and ports of the microservices, right?
Then my question is what is the fundamental difference that is making load balancer a load balancer and service discovery a service discovery?
Pardon my mistake. It may be my mis-understanding. But if you can please help it would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
令人敬畏的思维方式,我建议通过Q& a :)
让我选择一个问题:“我们正在使用负载平衡器再次消除了记住MicroServices的URL和端口的需求,对吗?”
那么,客户如何知道负载平衡器的地址?生产和测试阶段将有所不同。在一个区域化的世界中,它在不同地区可能(也可能不会)不同。
下一个维度是服务本身的体系结构。并非每个独立节点都知道如何在服务发现中注册自己。有几个节点在负载平衡器后面运行是完全可以的 - 在这种情况下,整个服务看起来像是整个世界的新产品。客户仍然需要发现负载平衡器。
PS
每个服务节点都独立记录自己以发现服务发现和客户发现并随机连接到这些想法的想法 - 这个概念通常称为“服务网格”,这是一个进行所有发现,路由,故障检测等的中间档案。
Awesome line of thinking, I propose to get to the bottom via Q&A :)
Let me pick one of questions: "We are using the load balancer to again eliminate the needs of remembering URL's and ports of the microservices, right?"
So how will a client know the address of the Load Balancer? It will be different for production and testing stages; and in a regionalized world, it may (or may not) be different in different regions.
The next dimension is the architecture of the service itself. It is not given that every independent node knows how to register itself with the service discovery. It completely ok to have several nodes be running behind a load balancer - in this case, the whole service looks like a singe box for the entire world. Clients still need to discover the load balancer.
p.s.
The idea that every service node independently registers itself to service discovery and clients discover and randomly connected to those - this concept often called "service mesh" - a middle ware to do all discovery, routing, failure detection, etc.