Architecture model: service instance one correspondence with the virtual machine

Architecture model: service instance one correspondence with the virtual machine

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

The service is packaged as a virtual machine image and deploy each service instance as a separate VM

example

  • Netflix each service is packaged as EC2 AMI, and deploy each service instance is EC2 instance. 999

Resulting Context

The benefits of this approach include:

  • It can be directly extended service by increasing the number of instances. Amazon Autoscaling Groups can even do this automatically according to the load.
  • VM encapsulate the details of the technique for constructing and services. For example, all services are started and stopped in exactly the same way.
  • Each service instance is isolated
  • VM impose restrictions on service instances CPU and memory consumption
  • AWS and other IaaS solution provides a mature and feature-rich infrastructure for deploying and managing virtual machines. E.g,
    • Elastic Load Balancer -
    • Autoscaling groups

A disadvantage of this method include:

  • Build VM images is slow and time-consuming

Associated mode

  • This mode is the refinement of each host a single service model
  • Service instance mode of each container is another solution
  • No server deployment mode is another solution.

Guess you like

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