Search code examples
dockerservervirtual-machinevirtualization

what does it mean by 'one application per one operating system' in hyper-visor virtualization?


I was going through the documentation for docker. It was providing the concepts for virtual machine before container. The author stated that, a server can be divided into multiple virtual machines having their own operating system. He also stated that, this way, multiple applications can be run in one physical server by running each of them in separate virtual machine (one virtual machine for one application). I was little bit confused here. Can't multiple applications run in one virtual machine (operating system) without the need for other vm ? By applications, what do we mean? I am a total beginner in this topic. If anyone could make me understand this terminology, I would be very grateful. Thank You.


Solution

  • An application is a service or a process such as: Nginx, PHP, Redis, Apache, Memcached and so on.

    The reason why is recommended this way it is because containers have been designed to isolate a process by giving its own userspace and filesystem.

    Therefore, this comes of benefits such as: having just one process per container makes it easily re-usable for another projects, easily scalable and you also separate worries so for example if run 2 applications inside a container and you want to shut one of them then will that process gracefully stop or you will have to stop the entire container?