Book Image

Python Microservices Development

Book Image

Python Microservices Development

Overview of this book

We often deploy our web applications into the cloud, and our code needs to interact with many third-party services. An efficient way to build applications to do this is through microservices architecture. But, in practice, it's hard to get this right due to the complexity of all the pieces interacting with each other. This book will teach you how to overcome these issues and craft applications that are built as small standard units, using all the proven best practices and avoiding the usual traps. It's a practical book: you’ll build everything using Python 3 and its amazing tooling ecosystem. You will understand the principles of TDD and apply them. You will use Flask, Tox, and other tools to build your services using best practices. You will learn how to secure connections between services, and how to script Nginx using Lua to build web application firewall features such as rate limiting. You will also familiarize yourself with Docker’s role in microservices, and use Docker containers, CoreOS, and Amazon Web Services to deploy your services. This book will take you on a journey, ending with the creation of a complete Python application based on microservices. By the end of the book, you will be well versed with the fundamentals of building, designing, testing, and deploying your Python microservices.
Table of Contents (20 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Introduction

Storage - EBS, S3, RDS, ElasticCache, and CloudFront


When you create an EC2 instance, it works with one or several Elastic Block Stores (EBS) (https://aws.amazon.com/ebs/). An EBS is a replicated storage volume EC2 instances can mount to use as their filesystem. When you create a new EC2 instance, you can create a new EBS, and decide if it runs on an SSD or an HDD disk, the initial size, and some other options. Depending on your choices, the volume is more or less expensive.

Simple Storage Service (S3) (https://aws.amazon.com/s3/) is a storage service that organizes data into buckets. Buckets are, roughly, namespaces that you can use to organize your data. A bucket can be seen as a key-value storage, where a value is data you want to store. There is no upper limit for the size of the data, and S3 provides everything needed to stream big files in and out of its buckets. S3 is often used to distribute files, since each entry in a bucket can be exposed as a unique, public URL. CloudFront can...