是否有一个特定的标准可以遵循,因此可以将某些东西称为“微服务架构”?
过去我使用的是我认为的“微服务”。我们有一个服务发现,应用程序通过 REST 同步调用相互通信,我认为这称为请求/响应。
现在我们正在开发一个应用程序,它被简单地分解为多个小应用程序,这些应用程序通过使用 Kafka 发布/订阅来协同工作,可以说它们之间没有直接通信,也没有服务发现。
可以肯定地说这些也是“微服务”吗?或者我应该如何称呼它们?
In the past I worked with what I believe were "microservices". We had a service discovery and the applications communicated with each other through REST sync calls, which I believe is called request / response.
Now we are working on an application that is simply broken down into multiple small applications which work together through publish / subscribe using Kafka, there's no direct communication between them nor a service discovery, per say.
Is it safe to say that these are "Microservices" too or what should I call them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如一位评论者指出的那样——答案总是固执己见(而 stackoverflow 通常不是基于意见的问题的最佳场所),但我并不害怕给出我的答案以试图提供帮助。
我的观点与马丁·福勒和其他人在过去十年中教给我们的内容以及亚马逊维尔纳·沃格尔斯的开创性工作的见解相一致。他们的定义是,微服务不是一个定义明确的单一标准,而是一种可以包含分布式计算中一系列不同方法的架构风格。它们的共同点是在许多不同维度提供可扩展性的目标,但主要是系统复杂性、组织生产力、吞吐量和弹性——同时价格实惠。为了实现这一目标,设计应围绕以下内容:
这些目标的结果也是采用分布式系统架构和水平可扩展性设计(无状态、计算和存储分离等)。 )。
因此,如果您觉得您的设计符合这些原则,那么我认为您已经成功地应用了微服务架构风格。
如果您想了解有关这一思想流派的更多信息,我建议您这篇文章。
As one commenter pointed out- An answer will always be opinionated (and stackoverflow is generally not the best place for opinion based questions), but I am not afraid to give mine in an attempt to help.
My view goes along the lines of what Martin Fowler and others have taught us in last decade, as well as the insight from the pioneering work of Werner Vogels at Amazon. Their definitions are that microservices are not a well defined single standard, but an architectural style that can encompass a range of different approaches in distributed computing. What they have in common are the goals of providing scalability in many different dimensions, but mostly system complexity, organizational productivity, throughput and resilience - All while being affordable. To achieve that the designs should be centered around:
A consequence of those goals is also the embrace of distributed system architectures and design for horizontal scalability (statelessness, separation of compute and storage, etc.).
So if you feel your designs are along those lines then in my opinion you would have applied the microservices architectural style successfully.
If you want to learn more about this school of thought I recommend this read.