Book Image

Cloud Native Python

By : Manish Sethi
Book Image

Cloud Native Python

By: Manish Sethi

Overview of this book

Businesses today are evolving so rapidly that having their own infrastructure to support their expansion is not feasible. As a result, they have been resorting to the elasticity of the cloud to provide a platform to build and deploy their highly scalable applications. This book will be the one stop for you to learn all about building cloud-native architectures in Python. It will begin by introducing you to cloud-native architecture and will help break it down for you. Then you’ll learn how to build microservices in Python using REST APIs in an event driven approach and you will build the web layer. Next, you’ll learn about Interacting data services and building Web views with React, after which we will take a detailed look at application security and performance. Then, you’ll also learn how to Dockerize your services. And finally, you’ll learn how to deploy the application on the AWS and Azure platforms. We will end the book by discussing some concepts and techniques around troubleshooting problems that might occur with your applications after you’ve deployed them. This book will teach you how to 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: we're going to build everything using Python 3 and its amazing tooling ecosystem. The book will take you on a journey, the destination of which, is the creation of a complete Python application based on microservices over the cloud platform
Table of Contents (14 chapters)
Creating UIs to Scale with Flux

CORS - Cross-Origin Resource Sharing

CORS helps maintain data integrity between the API server and the client for the API request.

The idea behind using CORS is that the server and client should have enough information about each other so that they can authenticate each other, and transfer data over a secure channel using the HTTP header.

When a client makes an API call, it is either a GET or POST request, where the body is usually text/plain with headers called Origin--this includes protocol, domain name, and port with respect to the requesting page. When the server acknowledges the request, and sends the response along with the Access-Control-Allow-Origin header to the same Origin, it makes sure the response is received at the correct Origin.

In this way, resource sharing happens between Origins.

Almost all browsers now support CORS, which includes IE 8+, Firefox 3.5+, and Chrome...