This is the code repository for Microservices Deployment Cookbook, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
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.
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
package com.packt.microservices.geolocation;
import java.io.Serializable;
import java.util.UUID;
public class GeoLocation implements Serializable {
private static final long serialVersionUID = 1L;
private double latitude;
private double longitude;
private UUID userId;
private long timestamp;
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}