Boosting Python Web Apps with Content Delivery Networks

About Course

Ready to take your Python web app to the next level? This course will teach you how to dramatically improve your app’s performance by leveraging Content Delivery Networks (CDNs) to optimize static resources. Learn how to make your application faster, reduce server load, and enhance the user experience with a simple yet effective approach.
Why CDNs Matter for High-Performance Python Apps Building a fast, efficient Python web app involves more than just writing great code and optimizing your database. While Python handles the backend, your web pages might still be making 30, 40, or even 50+ requests per page load. Traditionally, you might use servers like Nginx to manage this, but adding a CDN can take your app’s performance to a whole new level.
A CDN replicates and caches your static resources globally, ensuring your content is delivered swiftly to users no matter where they are. This can not only enhance the perceived speed of your app but also reduce the load on your servers by over 75%.
What You’ll Learn: This course provides a step-by-step guide, complete with live coding demos, on how to seamlessly integrate a CDN (specifically Bunny CDN) with your Python web app using Flask. You’ll see real-world before-and-after performance metrics, including insights from Talk Python’s infrastructure during a high-traffic period.
Key Course Highlights:
Introduction to Python Web Development: Start with the fundamentals of building dynamic websites and applications using Python, and understand the core concepts needed for high-performance apps.
Understanding Content Delivery Networks (CDNs): Discover what CDNs are, how they work, and why they are essential for speeding up your web app. Learn about their role in reducing latency and improving user experience.
Step-by-Step Integration Techniques: Follow along with practical, hands-on demos that show you how to set up and configure Bunny CDN with a Flask-based web application. You’ll learn how to manage static assets and optimize delivery for faster load times.
Real Performance Insights: Explore real-world examples, including performance improvements seen during high-traffic events. Understand the impact of CDNs on server load and user experience.
Optimize Your Application for a Global Audience: Learn to efficiently handle global traffic by localizing requests through CDN replication, minimizing delays, and boosting app speed across the globe.
Who Should Take This Course? Whether you’re new to Python or a seasoned web developer, this course is packed with valuable tips and insights to help you optimize your Python web applications. You’ll walk away with the skills to seamlessly integrate a CDN, ensuring your app performs at its best, even under heavy traffic.
Join us on this journey to make your Python apps faster, more efficient, and ready to fly!

Show More

What Will You Learn?

  • Understand how CDNs work and interact with web applications. Deliver globally scalable content using CDNs with georeplication. Optimize static content delivery (images, CSS, JavaScript) via CDNs. Manage caching to avoid legacy content issues and maximize performance. Host and serve large user-generated content efficiently. Utilize storage zones for global content distribution. Debug CDN issues across the CDN, web app, and browser layers. Test full page load performance for improved user experience. Replace Google fonts with GDPR-compliant alternatives. Learn object-oriented programming in Python. Perform file compression and decompression using Python. Analyze supermarket sales data with data analysis techniques.

Course Content

Lessons
content

  • Welcome
    00:00
  • What is a CDN?
  • More than one request
  • Not just optimizing server-side
  • Why I avoided a CDN
  • Tech stack for our app
  • What are we going to build?
  • Get the source
  • Installing Python 3
  • Editor choices
  • Bunny.net account
  • Intro to static content
  • Running the demo app
  • Project code structure
  • Local is always fast
  • Running over ngrok
  • CDNs and pull zones
  • Creating the static content pull zone
  • First CDN url
  • The rest of the static links
  • Faster still with preconnect tag
  • Smaller images are still better
  • Be careful with private content
  • Large content introduction
  • CDN object storage
  • How Talk Python uses storage
  • Where is our large content in the app?
  • Getting the large files
  • Creating the storage zone
  • Uploading files
  • Demo: User-generated content in app
  • Welcome to fresh caches
  • The caching problem
  • The caching fix
  • cache_id_builder
  • Demo: using cache_id_builder
  • Remember vary by in the CDN
  • Finishing the rest of the links
  • Troubleshooting introduction
  • Check the dev tools
  • Try without the CDN
  • Demo: Toggling CDN on and off for dev
  • The CDN keeps logs too
  • Purge the cache
  • Fonts are tricky on the web
  • But it’s an ad company
  • Bunny is not an ad company
  • What does API compatible mean?
  • Using Bunny fonts
  • Performance testing introduction
  • Testing with LightHouse
  • Testing with network tools
  • Quick review and thanks
  • Remember the repo
  • Stay in touch