Session

Make Your Python Web App Fly Around the World with CDNs

You’re ready to launch your Python app. You want it to f-l-y of course. Static resources can be a huge portion of that equation. Leveraging a CDN could save you over 75% of your server load and make it way faster. This talk with show you how in a step by step guide. It’s way easier than you think.

Building a high performance Python web app requires many key elements. First you likely focus on your Python code and making the database fast. But on my web page requests, that Python HTML response is a small, although important, portion. It’s common to have 30, 40, 50, or more requests per page. In production, the frequent guidance is to host these behind nginx or similar server. Often that is enough. But by bringing a CDN into the mix to globally replicate and localize all those requests can seriously improve the perceived speed of your app for a global user-base. But did you know that these static resources can put a massive load on your server too? In this talk, Michael Kennedy will give you a step by step guide with live code demos on how to incorporate a CDN (Bunny CND specifically) with a Flask application. You will also see the before and after performance stats from Talk Python’s web infrastructure from last year’s Black Friday week of traffic.