关于Eureka 2.x,别再人云亦云了!

原文:http://www.itmuch.com/spring-cloud/eureka-2-news/ ,转载请说明出处。git

最近朋友圈被Eureka 2.x中止开发的新闻刷屏,例如:github

关于第二篇,我想说,这是在造谣。spring

不妨来看一下官方的言论:ide

The open source work on eureka 2.0 has been discontinued. The code base and artifacts that were released as part of the existing repository of work on the 2.x branch is considered use at your own risk.性能

来自:https://github.com/Netflix/eureka/wikiui

看清楚官方的言辞:官方只是说Eureka 2.0的开发被中止了,若是您将Eureka 2.0分支用在生产,将后果自负!this

看起来挺吓人的。但真的那么可怕吗?.net

关于Eureka版本

Eureka 2.x历来就没有正式发布过! 目前最新的稳定版本是1.9.3。笔者第一次看到Eureka 2.0的文章是2016年,那时候官方宣称要开发Eureka 2.0,使用小批量的消息推送替代Eureka 1.x中的纯心跳机制(基于定时任务)的消息传递。debug

可是两年过去了,Eureka 2.0最终没有孵化出来,可是毫不表明Eureka的闭源!官方依然在积极地维护Eureka 1.x!code

不妨来看一下Eureka的发布历史:https://github.com/Netflix/eureka/releases

能够看到,Eureka的版本维护至关勤快!

谈谈2.x的流产

就笔者的研究来看,官方关闭2.x分支至少2年了。只是最近可能考虑到会有团队会将Eureka 2.x用于线上,甚至基于2.x开发,因此友情提示一下。

可是问题是:大部分用户都是由于Spring Cloud才接触到Eureka,Spring Cloud使用的是Eureka 1.x!退一万步,你会在本身项目中使用一个非正式发布的版本吗?

在我来看,这就是个友情提示,连个新闻都算不上。宣布中止开发已经中止2年的分支,还能算是新闻吗?

不是个例

事实上,这不是Netflix(开源Eureka的公司)第一次跳票了。

2016年,Netflix宣布将在16年末或17年初开源Zuul 2.x,结果写完发现太复杂了,并且性能提高也没有达到预期。因而官方选择彻底重构!知道2018年1月,Zuul 2.x才被开源,2018年4月才发布到中央仓库!

https://github.com/netflix/zuul/tree/1.x

A lot of people are asking about the status of Zuul 2.0. We are actively working on open sourcing it and with it, likely many filters that we use at Netflix. Yes, we realize it's been a long time coming. When we initially wrote Zuul 2.0, we heavily relied on RxJava to string filters together with Netty. This ended up adding a lot of complexity to the Zuul 2.0 core as well as made it quite difficult to operate and debug. We didn't think it was right to release Zuul 2.0 like this. So we spent a lot of time refactoring out this pattern, using Netty constructs directly. This took the better part of a year to complete and deploy safely within Netflix. So this work is now done. We are working towards releasing this much better, easier to understand, and more reliable Zuul 2.0. Obviously Netflix's business priorities take precedence to our open sourcing efforts, so as we get free time we will put efforts to open sourcing! Stay Tuned.

Current Zuul 2 development is on the 2.1 branch

其余项目的相似状况

不妨多聊聊。相信你们都很熟悉Netty,或者至少据说过。

Netty也有相似的状况。Netty团队开源Netty 5后,发现代码复杂度太高,同时性能提高也并无预期中的那么好,因而中止了Netty 5的开发。

那是否是说Netty 5闭源了?

退一万步

退一万步讲,Eureka即便闭源,Spring Cloud也不至于凉凉。Spring Cloud支持使用Eureka、Zookeeper、Consul实现服务发现的能力。

从Eureka切换成Zookeeper只须要改个依赖,加两行配置就能够了。

总结

总而言之:

  • Eureka没有闭源,是Eurkea 2.x分支再也不维护!
  • Spring Cloud并不强依赖Eureka,Spring Cloud Commons实现了通用抽象,容许咱们使用本身喜欢的服务发现组件!
  • 悲观是好事,说明有危机感,可是过分解读,消费开发人员的情怀就过度了。
相关文章
相关标签/搜索