Microservices Development Cookbook

Book description

Quickly learn and employ practical methods for developing microservices

Key Features

  • Get to grips with microservice architecture to build enterprise-ready applications
  • Adopt the best practices to find solutions to specific problems
  • Monitor and manage your services in production

Book Description

Microservices have become a popular way to build distributed systems that power modern web and mobile apps. Deploying your application as a suite of independently deployable, modular, and scalable services has many benefits. In this book, you'll learn to employ microservices in order to make your application more fault-tolerant and easier to scale and change.

Using an example-driven approach, Microservice Development Cookbook introduces you to the microservice architectural style. You'll learn how to transition from a traditional monolithic application to a suite of small services that interact to provide smooth functionality to your client applications. You'll also learn about the patterns used to organize services, so you can optimize request handling and processing and see how to handle service-to-service interactions. You'll then move on to understanding how to secure microservices and add monitoring in order to debug problems. This book also covers fault-tolerance and reliability patterns that help you use microservices to isolate failures in your applications.

By the end of the book, you'll be able to work with a team to break a large, monolithic codebase into independently deployable and scalable microservices. You'll also study how to efficiently and effortlessly manage a microservice-based architecture.

What you will learn

  • Learn how to design microservice-based systems
  • Create services that fail without impacting users
  • Monitor your services to perform debugging and create observable systems
  • Manage the security of your services
  • Create fast and reliable deployment pipelines
  • Manage multiple environments for your services
  • Simplify the local development of microservice-based systems

Who this book is for

Microservice Development Cookbook is for developers who would like to build effective and scalable microservices. Basic knowledge of the microservices architecture is assumed.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Microservices Development Cookbook
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. Packt is searching for authors like you
  5. Preface
    1. Why microservices?
      1. Microservice prerequisites
      2. Microservices benefits
        1. Scaling
        2. Team organization
        3. Reliability
    2. Who this book is for
    3. What this book covers
    4. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    5. Sections
      1. Getting ready
      2. How to do it…
    6. Get in touch
      1. Reviews
  6. Breaking the Monolith
    1. Introduction
    2. Organizing your team
      1. How to do it…
        1. Discussion
    3. Decomposing by business capability
      1. How to do it...
    4. Identifying bounded contexts
      1. How to do it...
    5. Migrating data in production
      1. How to do it...
    6. Refactoring your monolith
      1. How to do it...
    7. Evolving your monolith into services
      1. How to do it...
    8. Evolving your test suite
      1. Getting ready
      2. How to do it...
    9. Using Docker for local development
      1. Getting ready
      2. How to do it...
    10. Routing requests to services
      1. How to do it...
  7. Edge Services
    1. Introduction
    2. Controlling access to your service with an edge proxy server
      1. Operational notes
      2. How to do it...
    3. Extending your services with sidecars
      1. How to do it...
    4. Using API Gateways for routing requests to services
      1. Design considerations
      2. How to do it...
    5. Stopping cascading failures with Hystrix
      1. How to do it...
    6. Rate limiting
      1. How to do it...
    7. Using service mesh for shared concerns
      1. How to do it...
  8. Inter-service Communication
    1. Introduction
    2. Service-to-service communication
      1. How to do it...
    3. Asynchronous requests
      1. How to do it...
    4. Service discovery
      1. How to do it...
        1. Registering with the service registry
        2. Finding services
    5. Server-side load balancing
      1. How to do it...
    6. Client-side load balancing
      1. How to do it...
    7. Building event-driven microservices
      1. How to do it...
        1. Message producer
        2. Message consumer
    8. Evolving APIs
      1. How to do it...
  9. Client Patterns
    1. Introduction
    2. Modeling concurrency with dependent futures
      1. How to do it...
    3. Backend for frontend
      1. How to do it...
    4. Consistent RPC with HTTP and JSON
      1. How to do it...
    5. Using Thrift
      1. How to do it...
    6. Using gRPC
      1. How to do it...
  10. Reliability Patterns
    1. Introduction
    2. Using circuit breakers
      1. How to do it...
    3. Retrying requests with exponential backoff
      1. How to do it...
    4. Improving performance with caching
      1. How to do it...
    5. Fronting your services with a CDN
      1. How to do it...
      2. Gracefully degrading the user experience
    6. Verifying fault tolerance with Gameday exercises
      1. Prerequisites
      2. How to do it...
        1. A template for Gameday exercises
    7. Introducing automated chaos
      1. How to do it...
  11. Security
    1. Introduction
    2. Authenticating your microservices
      1. How to do it...
    3. Securing containers
      1. How to do it...
    4. Secure configuration
      1. How to do it...
    5. Secure logging
    6. Infrastructure as Code
      1. How to do it...
  12. Monitoring and Observability
    1. Introduction
    2. Structured JSON logging
      1. How to do it...
    3. Collecting metrics with StatsD and Graphite
      1. How to do it...
    4. Collecting metrics with Prometheus
      1. How to do it...
    5. Making debugging easier with tracing
      1. How to do it...
    6. Alerting us when something goes wrong
      1. How to do it...
  13. Scaling
    1. Introduction
    2. Load testing microservices with Vegeta
      1. How to do it...
    3. Load testing microservices with Gatling
      1. How to do it...
    4. Building auto-scaling clusters
      1. How to do it...
  14. Deploying Microservices
    1. Introduction
    2. Configuring your service to run in a container
      1. How to do it…
    3. Running multi-container applications with Docker Compose
      1. How to do it…
    4. Deploying your service on Kubernetes
      1. How to do it…
    5. Test releases with canary deployments
      1. How to do it…
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Microservices Development Cookbook
  • Author(s): Paul Osman
  • Release date: August 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788479509