Python Web Apps that Fly with CDNs Transcripts
Chapter: Large Content
Lecture: Connecting and testing the CDN

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now, in order to serve these files, we don't want to serve them out of object storage. We want to serve them over a CDN.
0:06 So a new pull zone, here we come. This will be the second time. And what are we going to call it? Probably not exactly the name.
0:13 So we'll just call this video collector user generated content or something like that. That's what I'm feeling coming on.
0:21 And then we can pick the storage zone, not the URL like we did, a storage zone. And it says, well, which one? How about that one?
0:28 This is the one we just created, uploaded the files to. We can pay a little bit less if we treat it as a high volume large file store
0:37 'cause it's not just that it's coming out of a storage zone but that there are hundreds of megabytes of files coming out of the storage zone.
0:45 So we'll add that. Now we already know how to do this but let's copy this URL just so we don't have to remember it anymore.
0:56 Again, you can put your own domain name here like we do for Talk Python, but for this demo, it doesn't make any sense to do so.
1:03 Let's go over to caching. One month is probably fine. And have our URL query string if we wanna keep that.
1:11 And it's optimized for video delivery automatically, which means it actually breaks the video up into smaller pieces so you can seek through it
1:19 in a much, much better way. That's awesome. So thank you for that. Origin Shield. Sure, I guess. Maybe we want that.
1:27 I actually am not totally sure whether we want it. It could be pulling from the replicated zones potentially, but I'll go ahead and say yes.
1:35 And then, yeah, that looks like that's probably all that we're going to need to set. So let's go and do a quick test. We could try to get to this.
1:48 If we go to one of these, let's say this one. I'm gonna click on this. - The top item in the main. - We'll be able to go and say,
1:59 well, we need that URL there, but it's gonna be like this slash, what was it? Self-hosted videos/that.mp4. See if I got it right.
2:13 Look at that, super fast. And that was the first time we hit it. All right, it's not auto-playing, but you'll see after I like poke around a bit,
2:24 It'll have cached a bunch of this stuff. It should be really, really quick. Super nice. Now, all we gotta do is basically come up with this URL
2:35 somewhere in our app instead of, instead of playing just the YouTube embed or sending the YouTube embed HTML, we'll just say we want a video element
2:49 and the video is right there.

Talk Python's Mastodon Michael Kennedy's Mastodon