Friday 4:15 p.m.–4:45 p.m.

Room 201 #pyconjp_201

Secrets of a WSGI master.

Graham Dumpleton

Audience level:
Intermediate
Category:
Web Frameworks
Slide:
slide https://www.slideshare.net/GrahamDumpleton/secrets-of-a-wsgi-master
Video:
video https://youtu.be/nFu2liwdNjE

Description

The mod\_wsgi ecosystem has grown in recent years, adding easier ways to deploy Python web applications, and tools for deploying to containerised environments. This talk will highlight new or not well known capabilities of mod\_wsgi. It will also provide tips on how to configure mod\_wsgi to ensure it is setup properly, will perform well and can automatically recover from problems that can occur.

Abstract

The WSGI (Web Server Gateway Interface) specification for hosting Python web applications was created in 2003. Measured in Internet time, it is ancient. The oldest main stream implementation of the WSGI specification is mod\_wsgi, for the Apache HTTPD server and it is 10 years old. WSGI is starting to be regarded as not up to the job, with technologies such as HTTP/2, web sockets and async dispatching being the way forward. Reality is that WSGI will be around for quite some time yet and for the majority of use cases is more than adequate. The real problem is not that we need to move to these new technologies, but that we aren't using the current WSGI servers to their best advantage. Moving to a new set of technologies will not necessarily make things better and will only create a new set of problems you have to solve. As one of the oldest WSGI server implementations, Apache and mod\_wsgi may be regarded as boring and not cool, but it is still the most stable option for hosting WSGI applications available. It also hasn't been sitting still, with a considerable amount of development work being done on mod\_wsgi in the last few years to make it even more robust and easier to use in a development environment as well as production, including in containerised environments. In this talk you will learn about many features of mod\_wsgi which you probably didn't even know existed, features which can help towards ensuring your Python web application deployment performs to its best, is secure, and has a low maintenance burden. Topics which will be covered include: * Easy deployment of Python web applications using mod\_wsgi-express. * Integration of mod\_wsgi-express with a Django web application. * Using mod\_wsgi-express in a development environment. * How to make use of mod\_wsgi-express in a production environment. * Using mod\_wsgi-express in a containerised runtime environment. * Ensuring consistency between development and production environments using warpdrive. * Using mod_wsgi-express to bootstrap a system Apache installation for hosting WSGI applications. * Why you should be using daemon mode of mod\_wsgi and not embedded mode. * How to properly associate mod\_wsgi with a Python virtual environment. * Building a robust deployment that can recover from misbehaving application code, backend services, or request overloading. * Using hooks provided by mod\_wsgi to monitor the performance of your Python web application. If you are a beginner, come learn why mod\_wsgi is still a good option for deploying your Python web applications. If you are an old time user of mod\_wsgi, find out about all the features you probably didn't know existed, revisit your current Python web application deployment and make it even better.
  • このエントリーをはてなブックマークに追加
CONTACT