从零开始学spring cloud(三) -------- Eureka简介

1.服务发现组件:Eureka

 

Eureka的开源文档介绍地址:https://github.com/Netflix/eureka/wiki/Eureka-at-a-glance

What is Eureka?

Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. We call this service, the Eureka Server. Eureka also comes with a Java-based client component,the Eureka Client, which makes interactions with the service much easier. The client also has a built-in load balancer that does basic round-robin load balancing. At Netflix, a much more sophisticated load balancer wraps Eureka to provide weighted load balancing based on several factors like traffic, resource usage, error conditions etc to provide superior resiliency.

翻译:

Eureka是一种基于REST(Representational State Transfer)的服务,主要用于AWS云(亚马逊云计算服务),用于定位服务,以实现中间层服务器的负载平衡和故障转移。 我们将此服务称为Eureka Server。 Eureka还附带了一个基于Java的客户端组件Eureka Client,它使与服务的交互变得更加容易。 客户端还有一个内置的负载均衡器,可以进行基本的循环负载均衡。 在Netflix,一个更复杂的负载均衡器包含Eureka基于流量,资源使用,错误条件等多种因素提供加权负载平衡,以提供卓越的弹性。

What is the need for Eureka?

In AWS cloud, because of its inherent nature, servers come and go. Unlike the traditional load balancers which work with servers with well known IP addresses and host names, in AWS, load balancing requires much more sophistication in registering and de-registering servers with load balancer on the fly. Since AWS does not yet provide a middle tier load balancer, Eureka fills a big gap in the area of mid-tier load balancing.

翻译:

在AWS云中,由于其固有的特性,服务器来来去去。 与使用具有众所周知的IP地址和主机名的服务器的传统负载均衡器不同,在AWS中,负载均衡在使用负载均衡器注册和取消注册服务器时需要更加复杂。 由于AWS尚未提供中间层负载均衡器,因此Eureka填补了中间层负载均衡领域的巨大空白。

High level architecture

The architecture above depicts how Eureka is deployed at Netflix and this is how you would typically run it. There is one eureka cluster per region which knows only about instances in its region. There is at the least one eureka server per zone to handle zone failures.

Services register with Eureka and then send heartbeats to renew their leases every 30 seconds. If the client cannot renew the lease for a few times, it is taken out of the server registry in about 90 seconds. The registration information and the renewals are replicated to all the eureka nodes in the cluster. The clients from any zone can look up the registry information (happens every 30 seconds) to locate their services (which could be in any zone) and make remote calls.

 

翻译:

上面的架构描述了如何在Netflix上部署Eureka,这就是您通常如何运行它。 每个地区只有一个尤里卡群集,它只知道该地区的实例。 每个区域至少有一个eureka服务器来处理区域故障。

服务在Eureka注册,然后发送心跳每30秒更新一次租约。 如果客户端无法续订租约几次,则会在大约90秒内将其从服务器注册表中删除。 注册信息和续订将复制到群集中的所有eureka节点。 来自任何区域的客户端都可以查找注册表信息(每30秒发生一次)以查找其服务(可能位于任何区域中)并进行远程调用。

 

Eureka是简单,便捷,高可用。

 

posted on 2019-04-10 22:20  小~虎  阅读(305)  评论(0编辑  收藏

导航