Mesos provides various isolation mechanisms on slaves for sandboxing different tasks. The allocation of resources to one framework/job or user should not have any unintended effects on the running jobs. Containers act as lightweight virtual machines, providing the necessary isolation mechanism without the overhead of virtual machines. Using containers, we can limit the amount of resources that the process and all its child processes can access. To explain the detailed working of containers is beyond the scope of this book. However, to understand Mesos isolation mechanism, it is sufficient to assume that the containers provide a set of features that provide resource isolation.
Mesos resource isolation mechanism has a pluggable design and has evolved a lot since the creation of the project. The Mesos slave uses containerizer to provide an isolated environment to run an executor and its tasks. The following figure shows the different isolation mechanisms used by slaves.