
About Course
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 cours 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 cours, I 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.
Dive into the world of Python web applications and Content Delivery Networks (CDNs) in this comprehensive video guide. Aimed at developers and enthusiasts alike, we explore the transformative impact of integrating CDNs with Python web apps.
Key features include:
Introduction to Python for Web Development
Discover the basics of using Python to build dynamic websites and applications.
Understanding CDNs
Learn about Content Delivery Networks, their role in web performance, and the benefits they offer.
Integration Techniques
Step-by-step instructions on integrating CDNs with Python web applications.
Whether you’re a Python novice or a seasoned web developer, this video offers valuable insights and practical tips to elevate your web applications’ speed and efficiency using CDNs. Join us on this journey to make your Python web apps fly!
Course Content
Lessons
-
Welcome
01:56 -
What is a CDN?
03:07 -
More than one request
01:55 -
Not just optimizing server-side
05:26 -
Why I avoided a CDN
04:19 -
Tech stack for our app
02:58 -
What are we going to build?
03:33 -
Get the source
01:13 -
Installing Python 3
01:05 -
Editor choices
01:04 -
Bunny.net account
01:30 -
Intro to static content
00:46 -
Running the demo app
07:28 -
Project code structure
03:36 -
Local is always fast
02:23 -
Running over ngrok
03:45 -
CDNs and pull zones
04:03 -
Creating the static content pull zone
10:25 -
First CDN url
02:32 -
The rest of the static links
05:11 -
Faster still with preconnect tag
04:27 -
Smaller images are still better
03:35 -
Be careful with private content
01:06 -
Large content introduction
02:10 -
CDN object storage
01:49 -
How Talk Python uses storage
01:39 -
Where is our large content in the app?
02:15 -
Getting the large files
01:08 -
Creating the storage zone
03:25 -
Uploading files
04:02 -
Demo: User-generated content in app
07:06 -
Welcome to fresh caches
01:45 -
The caching problem
02:48 -
The caching fix
03:14 -
cache_id_builder
05:46 -
Demo: using cache_id_builder
08:22 -
Remember vary by in the CDN
01:17 -
Finishing the rest of the links
06:09 -
Troubleshooting introduction
00:55 -
Check the dev tools
01:05 -
Try without the CDN
02:51 -
Demo: Toggling CDN on and off for dev
04:21 -
The CDN keeps logs too
02:07 -
Purge the cache
02:57 -
Fonts are tricky on the web
01:46 -
But it’s an ad company
02:08 -
Bunny is not an ad company
01:51 -
What does API compatible mean?
01:26 -
Using Bunny fonts
05:32 -
Performance testing introduction
01:02 -
Testing with LightHouse
09:02 -
Testing with network tools
06:15 -
Quick review and thanks
03:56 -
Remember the repo
00:27 -
Stay in touch
01:04