Book Image

Hands-On Microservices with Django

By : Tieme Woldman
Book Image

Hands-On Microservices with Django

By: Tieme Woldman

Overview of this book

Are you a Django developer looking to leverage microservices to create optimized and scalable web applications? If yes, then this book is for you. With microservices, you can split an application into self-contained services, each with a specific scope running asynchronously while collectively executing processes. Written by an experienced Python developer, Hands-On Microservices with Django teaches you how to develop and deploy microservices using Django and accompanying components such as Celery and Redis. You'll start by learning the principles of microservices and message/task queues and how to design them effectively. Next, you’ll focus on building your first microservices with Django RESTful APIs (DFR) and RabbitMQ, mastering the fundamentals along the way. As you progress, you’ll get to grips with dockerizing your microservices. Later, you’ll discover how to optimize and secure them for production environments. By the end of this book, you’ll have the skills you need to design and develop production-ready Django microservices applications with DFR, Celery/RabbitMQ, Redis, and Django's cache framework.
Table of Contents (18 chapters)
Free Chapter
1
Part 1:Introducing Microservices and Getting Started
5
Part 2:Building the Microservices Foundation
11
Part 3:Taking Microservices to the Production Level

Introducing microservices security

For securing microservices, we must consider these two situations and approaches:

  • Controlling external access: The access to microservices from (external) clients or producers such as a Django app
  • Controlling inter-service access: The access to microservices from other microservices such as the match address microservice calling the mail microservice

Because of its vertical flow direction, external access security is called north-south security. So, we use the term east-west security for horizontal inter-service access security. In the following subsections, we’ll look at how these apply to the microservices architecture and start with north-south security.

North-south security for microservices

If application requirements state that producers (clients) must authenticate themselves when offloading tasks to workers (microservices), we can apply set-up north-south security. We call this type of security measurement north...