Reader small image

You're reading from  Flask Framework Cookbook. - Second Edition

Product typeBook
Published inJul 2019
Reading LevelIntermediate
Publisher
ISBN-139781789951295
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Shalabh Aggarwal
Shalabh Aggarwal
author image
Shalabh Aggarwal

Shalabh Aggarwal has more than 13 years' experience in developing and managing enterprise systems, as well as web and mobile applications for small-to large-scale industries. He started his career working on Python, and although he now works on multiple technologies, he remains a Python developer at heart. He is passionate about open source technologies and writes highly readable and quality code. He is a seasoned engineering leader who loves building engineering teams and products from scratch across multiple domains while leveraging different technologies. He is also active in voluntary training for engineering students on non-conventional and open source topics. When not working with full-time assignments, he consults for start-ups on leveraging different technologies. When not writing code, he writes technical and non-technical literature, which is published across multiple blogs.
Read more about Shalabh Aggarwal

Right arrow

Microservices and Containers

Up until now, we have been developing the complete application as one block of code (usually known as a monolith), which is typically designed, tested, and deployed as a single unit. Scaling will also happen in a similar manner, where either the whole application is scaled or not. As the application grows in size, it is natural to have an inclination toward breaking the monolith into smaller chunks that can be separately managed and scaled. A solution to this is microservices. This chapter is all about microservices, and we will look at a few methodologies of creating and managing them.

Microservices is a method of developing and architecting software applications as a collection of multiple loosely-coupled services. These services are designed and developed with the goal of building single function modules that have clear and fine-grained interfaces...

Containerization with Docker

A container can be thought of as a standardized package of code that's needed to run the application and all its dependencies, which allows the application to run uniformly across multiple environments and platforms. Docker is a tool that allows for a standard and easy method of creating, distributing, deploying, and running applications using containers. Docker is essentially a virtualization software, but instead of visualizing the whole operating system, it allows the application to use the underlying host OS and requires applications to package additional dependencies and components as needed. This makes Docker container images very lightweight and easy to distribute.

Getting ready

The...

Orchestrating containers with Kubernetes

Docker containers are pretty easy and powerful, as we saw from the previous recipe; however, without a strong container orchestration system, managing containers can become pretty intensive. Kubernetes (also written as K8s) is an open source container orchestration system that automates the management, deployment, and scaling of containerized applications. It was originally developed at Google and, over the years, has become the most popular container orchestration software. It is widely available across all major cloud providers.

Getting ready

In this recipe, we will see how we can leverage Kubernetes to automate the deployment and scaling of our application container, which we created...

Going serverless with Zappa on AWS Lambda

Serverless computing is a cloud computing model where the cloud provider runs the server and dynamically manages the allocation of machine resources by scaling the resources up or down, depending on the consumption. Pricing is done based on the actual resources that are used. It also simplifies the overall process of deploying code, and it becomes relatively easy to maintain different executions for different environments such as development, testing, staging, and production. These properties of serverless computing make this model a perfect candidate for developing and deploying tons of microservices without worrying about managing the overhead.

Lambda is AWS's service for the serverless computing model. In this recipe, we will see how to deploy a simple Flask application with Lambda using a popular package named Zappa.

The serverless...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Flask Framework Cookbook. - Second Edition
Published in: Jul 2019Publisher: ISBN-13: 9781789951295
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Shalabh Aggarwal

Shalabh Aggarwal has more than 13 years' experience in developing and managing enterprise systems, as well as web and mobile applications for small-to large-scale industries. He started his career working on Python, and although he now works on multiple technologies, he remains a Python developer at heart. He is passionate about open source technologies and writes highly readable and quality code. He is a seasoned engineering leader who loves building engineering teams and products from scratch across multiple domains while leveraging different technologies. He is also active in voluntary training for engineering students on non-conventional and open source topics. When not working with full-time assignments, he consults for start-ups on leveraging different technologies. When not writing code, he writes technical and non-technical literature, which is published across multiple blogs.
Read more about Shalabh Aggarwal