Optimizing Python Services

Optimizing Python Services

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 25m | 166 MB

Sometimes, the difference between a good Python application and a great one isn’t found in the code; it’s in the services that support your software. In this course, instructor Miki Tebeka introduces Python optimization tips and techniques to develop and run more efficient sites and applications. Learn how to find bottlenecks, stress test your code, use caching algorithms, “cheat” effectively, distribute work on one or more machines, and pick the right transport and encoding methods. He also introduces load balancers and powerful server frameworks for HTTP and TCP, and shows how to serve static content. Plus, learn how to monitor performance of your projects and set up alerts, so you’ll know when a system or service fails.

Topics include:

  • Tools of the trade
  • Caching
  • Cheating
  • Distributing work
  • Writing servers
  • Choosing a server framework
  • Processes such as monitoring
Table of Contents

Introduction
1 Welcome
2 What you should know
3 Using the VM

Tools of the Trade
4 Always profile first
5 General tips
6 strace
7 Stressing

Caching
8 Overview
9 Bloom filter

Cheating
10 When approximation is good enough
11 Cheating example

Distributing Work
12 Amdahl’s Law
13 Example – Threads
14 Beyond single machine

Writing Servers
15 The C10K problem
16 asyncio
17 Choosing transportation
18 Choosing serialization format
19 Compression

Server Frameworks
20 How to choose a framework
21 HTTP servers
22 TCP servers
23 Load balancers
24 Serving static content

Process
25 Why do we need process
26 Monitoring
27 Alerting

Conclusion
28 Next steps