英文:
Microservices Architecture Best Practice
问题
如果每个服务都需要独立的端口,按照微服务架构,那么如何设计一个拥有数百个服务的系统呢?我的意思是,为了实现这个目标,在操作系统上开放数百个端口是否是一个好的做法?
最好的问候。
英文:
I will be appritiated if anyone answer to below quesion.
How a system will be designed with hundreds of services if each and every service has to be independent with a dedicated port as per microservices architecture? i mean is it a good practice to open hundreds of ports on OS for example?
Best Regards.
答案1
得分: 1
1.出于安全原因,微服务托管在私有虚拟私有云中,即节点(运行微服务的地方)没有公共IP。而且唯一访问它们的方式是通过网关API(见下文)。此外,“每个服务都必须是独立的”应该是指领域的意思链接1 链接2。
2.使用API网关模式来暴露服务:“为某些微服务提供单一入口点的服务”链接1 链接2。请注意,API网关是针对一组微服务的,也就是说可能会有几个不同组的服务网关(一个用于公共API,一个用于移动API等)。
3.只有您才能回答这个问题,因为只有您知道您要解决的问题是什么。在做决定之前,我建议您阅读关于MonolithFirst方法的内容。
英文:
-
For security reasons microservices are hosted in private vpc, i.e. the nodes (where the microservices are run) does not have public ip. And the only way to get access to them is via a gateway api (see below). Also "each and every services has to be independent" should be in the means of domain link1 link2.
-
To expose services use the API gateway pattern: "a service that provides a single-entry point for certain groups of microservices" link1 link2. Note that api gateway is for a group of microservices, i.e. there may be several gateways for different groups of services (one for public api, one for mobile api, etc).
-
Only you can answer this question because only you knows what problem you try to solve. Before deciding I recommend to read about MonolithFirst approach
答案2
得分: -1
微服务架构在某种程度上是ESB产品的下一代,但由于服务数量众多,我不确定它是否是一个解决方案!
英文:
Micro services architecture is somehow the next generation of ESB products but in this case due to the high number of services,I am not sure if it is a solution!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论