Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

A single instance of a microservice per VM

Pragya Keshap answered on February 18, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • How big should a microservice be?
  • A single instance of a microservice per host
  • A single instance of microservice per container

  • A single instance of a microservice per VM

    0

    According to this approach, you can package the service as a VM image and use this to deploy it. The service instance is deployed as a separate VM. For example, we can use an AWS EC2 instance as a VM, as illustrated in the following diagram:

    As you can see in the preceding diagram, this pattern packages an instance of the service as a VM image and launches the VM images as a running process, such as the Amazon EC2 AMI.

    Many companies use this approach to deploy microservices, such as Netflix, who use this pattern to deploy their video streaming service. Netflix packages an instance of the video streaming service as an EC2 AMI using Aminator, with each instance running as an EC2 instance. Other companies who use this pattern include Boxfuse and Cloud Native.

    There are various tools available on the market to package instances of your services as VM images. For example, Jenkins invokes Aminator to build an instance of your service as an EC2 AMI. Similarly, Packer creates VM images through multiple virtualization technologies such as EC2, DigitalOcean, VirtualBox, and VMware.

    Let's now move on and have a look at the benefits and drawbacks of this approach.

    Benefits

    This approach has the following benefits:

    It is easy to scale by increasing the number of instances; if you use this pattern, you can use the power of the mature cloud infrastructure. For example, AWS provides auto-scaling groups to scale the service automatically based on the traffic or load to the service. AWS also provides another useful feature, which is the Elastic Load Balancer.

    It is very isolated, which means that each service instance runs independently without being hampered by other services.

    Each instance has a fixed amount of resources, such as CPU or memory, and no other service can share its resources.

    Deployment is much simpler and more reliable.

    A VM encapsulates your services, along with the required technologies inside a virtual box, similar to a black box.

    Drawbacks

    However, this pattern does have the following disadvantages:

    Resource utilization is less efficient

    Building a VM image is time-consuming

    It requires you to build and manage VMs – although there are some tools such as Boxfuse that provide a solution for this

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 18 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.