Deployment patterns Flashcards
Deployment patterns
Multiple service instances per host Service instance per host Service instance per VM Service instance per Container Serverless deployment Service deployment platform
Multiple service instances per host: context
You have applied the Microservice architecture pattern and architected your system as a set of services. Each service is deployed as a set of service instances for throughput and availability.
Multiple service instances per host: problem
How are services packaged and deployed?
Multiple service instances per host: forces
- Services are written using a variety of languages, frameworks, and framework versions
- Each service consists of multiple service instances for throughput and availability
- Service must be independently deployable and scalable
- Service instances need to be isolated from one another
- You need to be able to quickly build and deploy a service
- You need to be able to constrain the resources (CPU and memory) consumed by a service
- You need to monitor the behavior of each service instance
- You want deployment to reliable
- You must deploy the application as cost-effectively as possible
Multiple service instances per host: solution
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. For example, a Tomcat or Jetty instances per service instance.
- Deploy multiple service instances in the same JVM. For example, as web applications or OSGI bundles.
Multiple service instances per host: result benefits
More efficient resource utilization than the Service Instance per host pattern
Multiple service instances per host: result drawback
- 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
Multiple service instances per host: related
The Single Service Instance per Host pattern is an alternative solution.
The Serverless deployment pattern is an alternative solution.
Single service instances per host: context
You have applied the Microservice architecture pattern and architected your system as a set of services. Each service is deployed as a set of service instances for throughput and availability.
Single service instances per host: problem
How are services packaged and deployed?
Single service instances per host: forces
- Services are written using a variety of languages, frameworks, and framework versions
- Each service consists of multiple service instances for throughput and availability
- Service must be independently deployable and scalable
- Service instances need to be isolated from one another
- You need to be able to quickly build and deploy a service
- You need to be able to constrain the resources (CPU and memory) consumed by a service
- You need to monitor the behavior of each service instance
- You want deployment to reliable
- You must deploy the application as cost-effectively as possible
Single service instances per host: solution
Deploy each single service instance on its own host
Single service instances per host: result benefits
- 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
Single service instances per host: result drawbacks
Potentially less efficient resource utilization compared to Multiple Services per Host because there are more hosts
Single service instances per host: relateds
The Multiple Service Instances per Host pattern is an alternative solution
The Service Instance per VM pattern is a refinement of this pattern
The Service Instance per Container pattern is a refinement of this pattern
The Serverless deployment pattern is an alternative solution.
Service Instance per VM: context
You have applied the Microservice architecture pattern and architected your system as a set of services. Each service is deployed as a set of service instances for throughput and availability.
Service Instance per VM: problem
How are services packaged and deployed?
Service Instance per VM: forces
- Services are written using a variety of languages, frameworks, and framework versions
- Each service consists of multiple service instances for throughput and availability
- Service must be independently deployable and scalable
- Service instances need to be isolated from one another
- You need to be able to quickly build and deploy a service
- You need to be able to constrain the resources (CPU and memory) consumed by a service
- You need to monitor the behavior of each service instance
- You want deployment to reliable
- You must deploy the application as cost-effectively as possible