简体   繁体   English

Spring Boot 微服务负载均衡 vs 云负载均衡

[英]Spring Boot Microservices load balancing vs cloud load balancing

I am new to Microservices.我是微服务的新手。 (Learning phase). (学习阶段)。 I have a question.我有个问题。 We deploy microservices at cloud.我们在云端部署微服务。 (eg AWS). (例如 AWS)。 Cloud already provide load balancing and logs.云已经提供负载平衡和日志。 And We also implement Load Balancing(Ribbon) and logs(Rabbit MQ and Zipkin) in Spring Boot.我们还在 Spring Boot 中实现了负载平衡(Ribbon)和日志(Rabbit MQ 和 Zipkin)。 What is the difference in these two implementation?这两种实现有什么区别? Do we need both?我们两者都需要吗? Can some answer these questions.有些人可以回答这些问题。

Thanks in advance.提前致谢。

Ribbon is a client side load balancer which means there is no any other hop in between your client and service. Ribbon 是一个客户端负载均衡器,这意味着您的客户端和服务之间没有任何其他跃点。 Basically you keep and maintain a list of service on your client.基本上,您在客户上保留和维护服务列表。

In AWS load balancer case you need to make another hop in between the client and server.在 AWS 负载均衡器的情况下,您需要在客户端和服务器之间进行另一跳。

Both have advanges and disadvantages.两者都有优点和缺点。 Former has the advantage of not having any dependency to any specific external solution.前者的优点是不依赖于任何特定的外部解决方案。 Basically with ribbon and service discovery like eureka you can deploy your product to any cloud provider or on-premise setup without additional effort.基本上,使用功能区和服务发现(如 eureka),您可以将您的产品部署到任何云提供商或本地设置,而无需额外的努力。 Latter has advantage of not needing an extra component of service discovery or keeping the cache of service list on client.后者的优点是不需要额外的服务发现组件或将服务列表缓存在客户端。 But it has that additional hop which might be an issue if you are trying to run an very high-load system.但是它具有额外的跃点,如果您尝试运行非常高负载的系统,这可能是一个问题。

Although I don't have much experience with AWS CloudWatch what I know is it helps you to collect logs to a central place from different AWS components.虽然我对 AWS CloudWatch 没有太多经验,但我知道它可以帮助您将日志从不同的 AWS 组件收集到一个中心位置。 And that is what you are trying to do with your solution.这就是您试图用您的解决方案做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM