Book Image

Learn Apache Mesos

By : Manuj Aggarwal
Book Image

Learn Apache Mesos

By: Manuj Aggarwal

Overview of this book

Apache Mesos is an open source cluster manager that provides efficient resource isolation and sharing across distributed applications or frameworks. This book will help you build a strong foundation of Mesos' capabilities along with practical examples to support the concepts explained throughout the book. Learn Apache Mesos dives straight into how Mesos works. You will be introduced to the distributed system and its challenges and then learn how you can use Mesos and its framework to solve data problems. You will also gain a full understanding of Mesos' internal mechanisms and get equipped to use Mesos and develop applications. Furthermore, this book lets you explore all the steps required to create highly available clusters and build your own Mesos frameworks. You will also cover application deployment and monitoring. By the end of this book, you will have learned how to use Mesos to make full use of machines and how to simplify data center maintenance.
Table of Contents (10 chapters)

Failover mechanism

To check the failover mechanism, we will first go to master2, and stop the Docker instances using the following command:

sudo docker stop (Container ID)

Here, you can check in Marathon that cassandra1 has stopped.

On refreshing the page, you can see it has created the instance on master2, where we have stopped it. This is done automatically. Here, the scenario where we have seen one of the containers went down and a backup was automatically created. Now, let's validate this by running the following command:

sudo docker ps -a

You will find that your old container is down, and the new one, which was created automatically, will be up.

What happens if your server is down? For example, let's shut down our master2 server. To do that, let's go to AWS console, then EC2 Instances, click on master2 server, stop the server. On the Marathon app, you can...