Async Techniques and Examples in Python Transcripts
Chapter: Why async?
Lecture: Async for scalability

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Next up, let's focus on how we can use asynchronous or concurrent programming for scalability. I want to take just a moment
0:08 to address this word, scalability. Often, people sort of think of scalability as performance and performance equaling speed and things being faster.
0:18 And that's not exactly what it means. Let's think in terms of websites here. That's not the only time we might think of this scalability concept.
0:25 But let's think in terms of websites. If your website can process individual requests 10 times faster, it will be more scalable
0:33 because it won't back up as much, right? Scalability doesn't refer to how fast an individual request can be
0:40 it refers to how many requests can your website handle or your system handle, until its performance degrades.
0:48 And that degrade might be just really long request times before you get back to someone or the browser.
0:55 It might mean it's so bad that requests start timing out. It might mean that your system actually crashes. There's some point where your system
1:03 degrades in performance. And when you talk about how scalable is a system it's how much concurrent processing?
1:10 How many requests at one time can it handle until it starts to degrade? As we add scalability to the system we might even make it a tiny bit slower
1:19 for an individual request. There's probably a little bit more work we're doing to add this capability to scale better, maybe.
1:27 It's not exactly talking about individual request speed because that actually might get worse. However, it means maybe we could handle
1:35 10 times as many concurrent users or 100 times as many concurrent users on exactly the same hardware. That's what we're focused on with scalability.
1:44 How do we get more out of the same hardware? And we'll see that Python has a couple of really interesting ways to do that.


Talk Python's Mastodon Michael Kennedy's Mastodon