Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Hands-On Docker for Microservices with Python
  • Toc
  • feedback
Hands-On Docker for Microservices with Python

Hands-On Docker for Microservices with Python

By : Jaime Buelta
3.8 (5)
close
Hands-On Docker for Microservices with Python

Hands-On Docker for Microservices with Python

3.8 (5)
By: Jaime Buelta

Overview of this book

Microservices architecture helps create complex systems with multiple, interconnected services that can be maintained by independent teams working in parallel. This book guides you on how to develop these complex systems with the help of containers. You’ll start by learning to design an efficient strategy for migrating a legacy monolithic system to microservices. You’ll build a RESTful microservice with Python and learn how to encapsulate the code for the services into a container using Docker. While developing the services, you’ll understand how to use tools such as GitHub and Travis CI to ensure continuous delivery (CD) and continuous integration (CI). As the systems become complex and grow in size, you’ll be introduced to Kubernetes and explore how to orchestrate a system of containers while managing multiple services. Next, you’ll configure Kubernetes clusters for production-ready environments and secure them for reliable deployments. In the concluding chapters, you’ll learn how to detect and debug critical problems with the help of logs and metrics. Finally, you’ll discover a variety of strategies for working with multiple teams dealing with different microservices for effective collaboration. By the end of this book, you’ll be able to build production-grade microservices as well as orchestrate a complex system of services using containers.
Table of Contents (19 chapters)
close
Free Chapter
1
Section 1: Introduction to Microservices
3
Section 2: Designing and Operating a Single Service – Creating a Docker Container
7
Section 3:Working with Multiple Services – Operating the System through Kubernetes
13
Section 4: Production-Ready System – Making It Work in Real-Life Environments

Deploying a new Docker image smoothly

When deploying a service in a production environment, it is critically important to ensure that it is going to work smoothly to avoid interrupting the service.

Kubernetes and HAProxy are able to detect when a service is running correctly, and take action when it's not, but we need to give an endpoint that acts as a health check and configure it to be pinged at regular intervals, for early detection of problems.

For simplicity, we will use the root URL as a health check, but we can design specific endpoints to be tested. A good health checkup checks that the service is working as expected, but is light and quick. Avoid the temptation of over testing or performing an external verification that could make the endpoint take a long time.

An API endpoint that returns an empty response is a great example, as it checks that the whole piping...
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete