According to this approach, we deploy a single instance of a microservice on its own single host. A service instance is deployed to its own host and each service instance runs independently. This approach has two specific patterns:
- A single instance of a microservice per VM
- A single instance of a microservice per container
A host can be a physical machine, a virtual machine, or a container such as a Docker container. The following diagram demonstrates this approach of deploying microservices:
As you can see in the preceding diagram, there is a number of hosts, each of which holds several instances of services. Each service instance has been deployed on its own host machine, that is either a VM or a container. Let's now discuss the benefits and drawbacks of this approach.