In: Computer Science
3. When a VM image is deployed to VMs, the image may contain only one single service or multiple services via the lightweight container technology (i.e., one service per container and multiple containers per VM). These two options for packaging services are illustrated in Figure 6.6 on p.112. Discuss advantage and disadvantage of these two packaging options.
An advantage of one service per virtual machine is that when only one service is used for a virtual machine, then a virtual machine image is created when a change is committed in its service. When there are two services per virtual machine, then that image must be rebaked whenever the first or second service is changed. This is a disadvantage of multiple services.
Now suppose we have two services. One service sends a message to the second service. If both are in the same virtual machine, then the message doesn't have to leave the virtual machine to deliver to the other service. But if both service 1 and service 2 are not in the same virtual machine, then more communication and handling will have to be involved. This is a disadvantage of one service per virtual machine. Another advantage of multiple services per virtual machine is that allowing multiple services into the same virtual machine will allow for deployment race conditions.