Apache Mesos is an open-source cluster manager that acts as an interface between machines and applications to provide high-level resource management. It provides applications with all available resources through dynamic sharing and isolation.
This distributed environment setup allows maximum resource utilization by reallocating available resources to other applications during inactive periods.
The components of Mesos are mainly a master daemon that manages the agent daemons, running on each cluster node, and frameworks that run tasks on these agents.
The Mesos master is the core component that ensures that the cluster will be highly available. It is like an orchestrator that communicates with agents on each node & framework schedulers, offers resources to each framework, and stores the current state of resources in the cluster.
Master is always deployed in a high availability configuration to avoid loss of state about resources and tasks due to failure. Mesos deploys standby master daemons which are relying on Zookeeper for recovering state in case of any failures.
An agent will be running on every node in the Mesos cluster. It is responsible for managing the resources running on the nodes and coordinating with the master. The agents report the information related to the machines to master periodically and, in turn, receive tasks that an application has scheduled to run.
Mesos Framework combines two parts, Scheduler, and Executor. The Scheduler registers in the Mesos master to obtain the unique framework id. It is the responsibility of the scheduler to schedule tasks based on available resources.
It also handles task failures and errors. The executor is responsible for executing the task launched by the scheduler and notifying back the status of each task. In Mesos, applications can implement custom scheduler and executor in different programming languages.
Mesos is an open-source development approach designed to be independent of the underlying infrastructure and solve different challenges.
Mesos was quickly adopted by many leading technology companies, which are for microservices, big data, and real-time analytics, to elastic scaling.