发现服务如何在多语言微服务架构中工作?

How discovery service works in polyglot micro services architecture?

如果我们使用 spring 引导构建所有微服务,则可以使用 Eureka Server(@EnableEurekaServer) 发现所有微服务(@EnableEurekaClient)。如果使用其他技术构建的一些微服务,如何在云(PCF、AWS 等)中实现发现、负载平衡、反向代理(网关)?

我在网络上阅读了很多与微服务相关的博客,但我没有得到正确的信息。

Eureka 服务器本身有一个 REST api 允许您管理它。您可以在此处找到文档:https://github.com/Netflix/eureka/wiki/Eureka-REST-operations 如果您使用不提供与 Eureka 直接集成的框架或语言,例如 Spring Boot,您必须手动完成。

您还可以利用 polyglot sidecar 支持将其他技术与 Eureka Server 集成以进行发现。例如,非 JVM 语言可以通过使用 @EnableSidecar 创建 Spring 引导应用程序来启用 Sidecar。这有效地触发了 @EnableCircuitBreaker@EnableDiscoveryClient@EnableZuulProxy 支持。该应用程序应该 运行 在与非 JVM 应用程序相同的主机上。 this Spring document. You may also take a look at an example implementation here

提供了更多详细信息