Deployment Patterns
In this pattern we run multiple instances of different services on a host (Physical or Virtual machine). There are various ways of deploying a service instance on a shared host including:
In this pattern, we deploy each single service instance on its own host. The benefits of this approach include:
Service Instance per VM
In this pattern each service is deployed as a set of service instances for throughput and availability. Package the service as a virtual machine image and deploy each service instance as a separate VM. The benefits of this approach include:
Service instance per container
In this pattern we package the service as a (Docker) container image and deploy each service instance as a container. The benefits of this approach include:
-K Himaanshu Shuklaa..
- Multiple service instances per host - deploy multiple service instances on a single host
- Service instance per host - deploy each service instance in its own host
- Service instance per VM - deploy each service instance in its VM
- Service instance per Container - deploy each service instance in its container
- Serverless deployment - deploy a service using serverless deployment platform
- Service deployment platform - deploy services using a highly automated deployment platform that provides a service abstraction
In this pattern we run multiple instances of different services on a host (Physical or Virtual machine). There are various ways of deploying a service instance on a shared host including:
- Deploy each service instance as a JVM process. e.g, a Tomcat or Jetty instances per service instance.
- Deploy multiple service instances in the same JVM. For example, as web applications or OSGI bundles.
- Risk of conflicting resource requirements.
- Risk of conflicting dependency versions.
- Difficult to limit the resources consumed by a service instance.
- If multiple services instances are deployed in the same process then its difficult to monitor the resource consumption of each service instance. Its also impossible to isolate each instance.
In this pattern, we deploy each single service instance on its own host. The benefits of this approach include:
- Services instances are isolated from one another
- There is no possibility of conflicting resource requirements or dependency versions
- A service instance can only consume at most the resources of a single host
- Its straightforward to monitor, manage, and redeploy each service instance
Service Instance per VM
In this pattern each service is deployed as a set of service instances for throughput and availability. Package the service as a virtual machine image and deploy each service instance as a separate VM. The benefits of this approach include:
- Its straightforward to scale the service by increasing the number of instances. Amazon Autoscaling Groups can even do this automatically based on load.
- The VM encapsulates the details of the technology used to build the service. All services are, for example, started and stopped in exactly the same way.
- Each service instance is isolated.
- A VM imposes limits on the CPU and memory consumed by a service instance.
Service instance per container
In this pattern we package the service as a (Docker) container image and deploy each service instance as a container. The benefits of this approach include:
- It is straightforward to scale up and down a service by changing the number of container instances.
- The container encapsulates the details of the technology used to build the service. All services are, for example, started and stopped in exactly the same way.
- Each service instance is isolated.
- A container imposes limits on the CPU and memory consumed by a service instance.
- Containers are extremely fast to build and start. Docker containers also start much faster than a VM since only the application process starts rather than an entire OS.
-K Himaanshu Shuklaa..
No comments:
Post a Comment