Why use containers?
Containers provide some distinct advantages over the traditional model of deploying an application
into a VM or onto a physical host.
The first advantage has to do with development. A general pain for developers when they are building
applications revolves around moving the application from a development environment, to test, and
then to production. Developers must spend a lot of time and effort checking the application's
dependencies as it moves through the environments. However, when an application is deployed to a
container, you can move the container between environments because it is isolated and all of the
binaries reside within the container itself.
Another reason for using containers is to achieve higher scale versus deploying an application to a
VM. To achieve the different environments of development, test, and production in a VM model, you
need at least three VMs; in a container model you need only one. That single VM, running a container
manager, can run three containers simulating development, test, and production environments. With
containers, you need fewer VMs to run your environments and you can achieve significantly higher
scale in your cloud environments.
Containers also allow for rapid deployment and operation of applications. Unlike VMs, containers
don’t have an underlying OS, as such. Think in terms of deployment. If you want to create a new
application or scale the existing application to support more load, you just load a new container; the
OS is already in place. This means that the time spent waiting for a container to deploy or scale up is
significantly shorter than with a VM because you are never waiting for the OS to start.
Windows Server containers versus Hyper-V containers
Two types of containers are available in Windows Server 2016:
Windows Server Containers
Hyper-V Containers
You can consider Windows Server containers to be the equivalent to Linux containers. Windows Server
container types isolate applications on the same container host. Each container has its own view of the
host system, including the kernel, processes, file systems, the registry, and other components. In the
case of Windows Server containers, they work between the user mode level and the kernel mode
level.
Hyper-V containers are based on a container technology that is rooted in hardware-assisted
virtualization. With hardware-assisted virtualization, Hyper-V containers' applications are provided a
highly isolated environment in which to operate, where the host OS cannot be affected in any way by
any running container.
Figure 3-7 shows what the layout might look like in relation to the two container technologies that are
available in Windows Server 2016.
100
CHAPTER 3 | Application platform
Do'stlaringiz bilan baham: |