📜 ⬆️ ⬇️

Where to place containers: on a dedicated server or a virtual machine?

By placing Docker containers on dedicated servers, organizations gain portability and stability. Expert Christopher Tozzi explains why the choice is sometimes made in favor of virtual machines.

For what you may need containers, you already understand. But do you know which type of server is more suitable for them? Is it really better for hosting platforms like Docker or any other similar container management environment to use dedicated servers than virtual machines?

The answer, of course, depends on a variety of parameters. The article discusses such parameters, as well as arguments for and against the use of containers on dedicated servers or virtual machines. I will focus on Docker, but the findings generally extend to any container management platform.
')


Dedicated server or virtual machine?


Comparing the pros and cons of dedicated servers and virtual machines for hosting a software environment is not a new task. Technical executives thought about it even when virtualization began to be widely used in data centers in the 2000s, long before Docker appeared.

In short, the main advantages of a dedicated server are as follows:


With virtual machines, in turn, offer the following benefits:


But using virtual machines has some drawbacks . These include the following:


To overcome these limitations, system administrators may resort to some techniques based on modern virtualization platforms. For example, you can create a dynamic disk image that will expand in volume as it is used by the virtual machine. That is, the amount of memory will not be locked until it is actually required by the user. You can use a backhaul so that in certain cases the virtual machine has direct access to the physical hardware.

However, these tricks are not always effective. Apply this approach can not be on all types of hosts and guest operating systems, and, in general, all this flows into an additional burden for the administrator. If the applications you intend to use need direct access to the physical equipment, then it is better to immediately run them on such equipment.

Or you can run applications in containers on a physical server, and you can kill two birds with one stone.

Square of the circle: how containers work on a dedicated server


Using containers on a physical server gives you many of the benefits of virtual machines while avoiding the disadvantages of virtualization.

Containers on dedicated servers allow you to:


In addition, when using containers with a dedicated server, you will have access to the benefits that, as a rule, are associated only with virtual machines, namely:


In general, containers on a dedicated server allow you to cram a non-inevitable solution to an unsolvable task. You get the advantages of a dedicated server: the speed and direct access to the physical server - and the advantages of virtual machines: portability and the ability to isolate programs.

Why not always place containers on a dedicated server. You are probably wondering, why don't containers always run directly on a dedicated server? If this approach provides all the benefits, why do we need any other?

Consider the following disadvantages of hosting a container on a dedicated server and not on a virtual machine:


Conclusion


It's not easy to decide whether to place containers on a dedicated server or on a virtual machine. You will have to compare all the pros and cons to determine which option is more appropriate for your organization.

It is pleasant that regardless of where the containers are placed, you will still benefit from the basic properties of containerization, including application portability, scalability and agility.

If you choose a virtual server or a dedicated server for your projects, try using the VDS.menu and DEDICATED.menu directories.

Source: https://habr.com/ru/post/319438/


All Articles