從零開始學spring cloud(三) -------- Eureka簡介

1.服務發現組件:Eureka

 

Eureka的開源文檔介紹地址:https://github.com/Netflix/eureka/wiki/Eureka-at-a-glancenode

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.git

翻譯:github

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.架構

翻譯:app

在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.ide

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.ui

 

翻譯:this

上面的架構描述瞭如何在Netflix上部署Eureka,這就是您一般如何運行它。 每一個地區只有一個尤里卡羣集,它只知道該地區的實例。 每一個區域至少有一個eureka服務器來處理區域故障。

服務在Eureka註冊,而後發送心跳每30秒更新一次租約。 若是客戶端沒法續訂租約幾回,則會在大約90秒內將其從服務器註冊表中刪除。 註冊信息和續訂將複製到羣集中的全部eureka節點。 來自任何區域的客戶端均可以查找註冊表信息(每30秒發生一次)以查找其服務(可能位於任何區域中)並進行遠程調用。

 

Eureka是簡單,便捷,高可用。

相關文章
相關標籤/搜索