We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

E-Commerce with Django at Scale: Effective Performance Lessons Learned

Formale Metadaten

Titel
E-Commerce with Django at Scale: Effective Performance Lessons Learned
Serientitel
Teil
8
Anzahl der Teile
46
Autor
Mitwirkende
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
I'll take you through the most effective performance lessons we've learned and show you how you can implement them (with example code). TWO-PASS CACHING WITH CLASS-BASED VIEWS By far, this is one of the most effective performance optimizations we have done in terms of HTTP response time. Using class-based views, we are able to do two-pass caching. On the first pass of the view, we render everything that's not specific to the user. No AJAX calls needed to get user specific content on the page. I'll show you how. DATA CACHING STRATEGY I'll review how we use multiple levels of data caching to greatly improve the amount of time it takes to rebuild the entire cache. DB READ REPLICAS FOR PERFORMANCE / CUSTOM BACKEND FOR FAILOVER Read replica databases are great for performance. You've set up a few read replicas and implemented a fancy new database router which sends read queries to the read replicas (round robin) for any data that doesn't need to be up-to-the-millisecond fresh (e.g. blog posts, product descriptions). You're sitting back and relishing in the improved performance when one of your database read replicas goes offline. Now what? I'll show you how we implemented a custom database backend to handle this gracefully. MIGRATIONS RULES This is less of a performance optimization and more of a set of rules we try to stick to. I'll review some snafus we've had and how we avoided future production issues while keeping the site at 99% uptime.