[英]I want explanation on where we can use microservices instead of containers and some applications of it
Example of a micro services application that we would do without using Containers.我们将不使用容器的微服务应用程序示例。 Explain why should we take that approach?
解释为什么我们应该采取这种方法?
The reason because normally containers are used in a microservices architecture is that it is an easy and light way to isolate an application so you can share the same physical machine among multiple services without problems of library dependencies or operating system requirements.微服务架构中通常使用容器的原因是,它是一种隔离应用程序的简便方法,因此您可以在多个服务之间共享同一台物理机器,而不会出现库依赖或操作系统要求的问题。
Apart from that, you can specify in the container the amount of resources your service needs so the same physical CPU or memory can be shared among the services proportionally as the services need.除此之外,您可以在容器中指定服务所需的资源量,以便可以根据服务需要按比例在服务之间共享相同的物理 CPU 或 memory。 And this is an important feature for cloud providers because they have a limited number of machines and they have to share them among all the applications deployed.
这对于云提供商来说是一个重要功能,因为他们的机器数量有限,并且必须在所有部署的应用程序中共享它们。
Technically, It is not necessary to use containers in a microservices architecture, for example, if you manage the physical machine and the library dependencies are the same for all your services and the ports needed for each service don't collide with the others you can deploy your services in traditional application servers in your machine without other problems but they wouldn't be portable.从技术上讲,在微服务架构中没有必要使用容器,例如,如果您管理物理机器并且所有服务的库依赖关系相同,并且每个服务所需的端口不会与其他服务发生冲突,那么您可以将您的服务部署在您机器中的传统应用程序服务器中,没有其他问题,但它们不可移植。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.