Architecture model: service instance one correspondence with the container

Architecture model: service instance one correspondence with the container

Context

You have applied micro-service architecture models and system architecture is a set of services. Each service deployed as a set of service instances, to achieve throughput and availability.

problem

How to package and deploy the service?

Points

  • Services using a variety of languages, frameworks and framework versions        
  • Write Each serving contains multiple service instances    
  • For throughput and availability of services must be deployed independently of    
  • Scalable service instance needs to be isolated from each other        
  • You need to be able to quickly build and deploy services      
  • You need to be able constrained resources (CPU and memory) services consumed    
  • You need to monitor the behavior of each service instance        
  • You want to deploy reliable        
  • You need to cost-effectively deploy applications as possible  

solution

Packaged as a service (Docker) vessel images and deploy each service instance a container

example

Docker is becoming a very popular way to package and deploy the service. Each service pack for the Docker mirror, each service instance are Docker containers. There are several Docker clustering framework, including:

Resulting Context

The benefits of this approach include:

  • Direct service by expanding and reducing the number of changes to container instance.
  • The details for constructing the packaged technologies and services. For example, all services are started and stopped in exactly the same way.
  • Each service instance is isolated container service instance CPU and memory consumption restrictions container building and starting very fast. For example, an application is packaged as Docker containers to be packaged AMI than 100 times faster. Docker containers starting speed is much faster than VM, since only the application process starts instead of the entire operating system.

The disadvantage of this method include (now feel very mature):

  • Infrastructure deployment container is not as rich infrastructure to deploy virtual machines.

Relevance Model

  • This model is refined service instances each host mode.
  • Each instance of VM service mode is another solution
  • No server deployment mode is another solution.

Guess you like

Origin www.cnblogs.com/paxlyf/p/11289000.html