Book Image

Microservices Deployment Cookbook

By : Vikram Murugesan
Book Image

Microservices Deployment Cookbook

By: Vikram Murugesan

Overview of this book

This book will help any team or organization understand, deploy, and manage microservices at scale. It is driven by a sample application, helping you gradually build a complete microservice-based ecosystem. Rather than just focusing on writing a microservice, this book addresses various other microservice-related solutions: deployments, clustering, load balancing, logging, streaming, and monitoring. The initial chapters offer insights into how web and enterprise apps can be migrated to scalable microservices. Moving on, you’ll see how to Dockerize your application so that it is ready to be shipped and deployed. We will look at how to deploy microservices on Mesos and Marathon and will also deploy microservices on Kubernetes. Next, you will implement service discovery and load balancing for your microservices. We’ll also show you how to build asynchronous streaming systems using Kafka Streams and Apache Spark. Finally, we wind up by aggregating your logs in Kafka, creating your own metrics, and monitoring the metrics for the microservice.
Table of Contents (15 chapters)
Microservices Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Introduction


Before we jump into the recipes and try creating a Mesos cluster, it is very important that you know what Mesos is and why we use it to deploy microservices.

Let's answer the first question: What is Mesos?

Mesos is a cluster management framework that makes resource allocation easier in order to run distributed applications. If you break this sentence down, it will start making more sense. Mesos is called a cluster management framework because it groups multiple machines into one single virtual resource pool. Let's say you have 10 machines with 4 GB memory, 4 cores each, and 10 GB disk space. Now you would like to use these machines to do different things, such as the following:

  • Run Spark jobs

  • Run long running services

  • Run Cron jobs

  • Run Hadoop

  • Run Cassandra

In this case, you would ideally have to go to a whiteboard and draw out an architecture diagram that identifies what is going to run on what machine. You will have machines dedicated for a single purpose. A machine dedicated to run...