- Building Serverless Python Web Services with Zappa
- Abdulwahid Abdulhaque Barguzar
- 253字
- 2021-07-16 18:16:13
What is Zappa?
Zappa is an open source tool that was developed and designed by Rich Jones, founder/CTO of Gun.io (https://www.gun.io/). Zappa was mainly designed to build and deploy serverless Python applications on AWS Lambda and API Gateway.
Zappa is great for deploying serverless Python microservices with frameworks such as Flask and Bottle for hosting large web applications and CMSes with Django. You can also deploy any Python WSGI application as well.
In the previous chapter, we implemented the basic hello world microservice, using AWS Lambda and API Gateway. Zappa automates all these manual processes and gives us a handy tool to build and deploy Python applications.
It's as easy as this:
$ pip install zappa
$ zappa init
$ zappa deploy
As we described earlier, the tradition of web hosting is where the server needs to be always online, listening to HTTP requests and processing the requests one by one. If the queue of incoming HTTP requests grows, then a timeout error will occur as the server will have failed to serve that many requests per second.
API Gateway serves each request with a virtual HTTP server with auto scalability. That's the reason it can serve a single request to millions of requests without fail. Hence, we get the infinite scaling with zero downtime infraction of your current deployment cost.
Now, we are going to go through an app demonstration, but, before we do that, let's configure Zappa on your machine, which we will go through in the upcoming section.
- 廣電5G從入門到精通
- Web安全防護(hù)指南:基礎(chǔ)篇
- CorelDRAW X6 中文版圖形設(shè)計(jì)實(shí)戰(zhàn)從入門到精通
- 物聯(lián)網(wǎng)(IoT)基礎(chǔ):網(wǎng)絡(luò)技術(shù)+協(xié)議+用例
- 物聯(lián)網(wǎng)安全:理論、實(shí)踐與創(chuàng)新
- Oracle SOA Suite 11g Performance Tuning Cookbook
- Go Web Scraping Quick Start Guide
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2014年中國互聯(lián)網(wǎng)安全大會文集
- Building RESTful Web Services with Spring 5(Second Edition)
- 計(jì)算機(jī)網(wǎng)絡(luò)原理與應(yīng)用技術(shù)
- 面向5G-Advanced的關(guān)鍵技術(shù)
- Android UI Design
- 網(wǎng)管第一課:網(wǎng)絡(luò)操作系統(tǒng)與配置管理
- 從實(shí)踐中學(xué)習(xí)手機(jī)抓包與數(shù)據(jù)分析
- INSTANT LinkedIn Customization How-to