一、原文:
A microservice represents an autonomous unit that can be deployed in isolation on a PAAS (Platform as a Service) or as a standalone process within an operating system. It is recommended to avoid deploying multiple services on the same machine, although the concept of machines has become less distinct nowadays. We will later explore how this isolation incurs certain costs but greatly simplifies the development of distributed systems, and there are various new technologies available to mitigate challenges arising from this deployment approach.
Services communicate with each other exclusively through network calls, reinforcing the separation between them and preventing tight coupling. These services should be capable of being modified independently, without impacting their consumers. When designing a service, it is crucial to consider what should be exposed and what should be concealed. Exposing too much can lead to coupling between the service and its consumers, requiring additional coordination and diminishing the service's autonomy.
二、翻译:
微服务是一个自主的单元,可以独立地部署在PAAS(平台即服务)上或作为操作系统中的一个独立进程。建议避免在同一台机器上部署多个服务,尽管机器的概念现在已经变得不那么明显了。我们将在稍后探讨这种隔离性产生的某些成本,但它大大简化了分布式系统的开发,而且有各种新技术可用以应对由此部署方式带来的挑战。
服务之间通过网络调用进行通信,加强了它们之间的分离,避免了紧密耦合。这些服务应该能够独立修改,而不影响它们的使用者。设计服务时,必须考虑应该暴露什么和隐藏什么。过度暴露会导致服务与其使用者之间的耦合,需要额外的协调工作,从而降低服务的自治性。