eureka 学习笔记1

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 适合的什么场景(能干啥?)

中小公司的微服务治理: 服务注册发现

eureka 以及常见的 注册中心对比

eureka 学习笔记1

eureka 的缺点

Eureka in its current form is a very stable system, battle tested in large cloud deployments with tens of thousand nodes. However, it has the following major limitations:

Only support homogenous client views: Eureka servers only expects the client to always get the entire registry and does not allow to get specific applications/VIP addresses. This imposes a memory limitation on all clients registering with Eureka, even if they need a very small subset of the Eureka’s registry.

Only supports scheduled updates: Eureka client follows a poll model to fetch updates from the server routinely. This imposes an overhead on the client of doing a scheduled call to the server, even if there are no changes and also delays the updates by the poll interval.

Replication algorithm limits scalability: Eureka follows a broadcast replication model i.e. all the servers replicate data and heartbeats to all the peers. This is simple and effective for the data set that eureka contains however replication is implemented by relaying all the HTTP calls that a server receives as is to all the peers. This limits scalability as every node has to withstand the entire write load on eureka.
Although Eureka 2.0 provides a more richer feature set, the above limitations are the major driving factors for the changes proposed in this version.

主要是这三点

当 Eureka 客户端服务实例数量达到一定时,Eureka Server 时常会出现服务不可用的情况,主要的问题集中在更新(Update)机制、复制(Replication)机制以及内存型存储,部分答案在 Eureka Wiki Eureka 2.0 Motivations 中也有描述.

由于大部分版本公司使用eureka 版本 都是1.X ,所以 不建议在生产 数以千计万计的服务实例中使用

可以考虑nacos ,或者使用某商云服务edas实现服务治理

参考文档地址

https://segmentfault.com/a/1190000015467967

https://github.com/Netflix/eureka/wiki