Transcript from the "Data Centers & the Cloud" Lesson
>> Jem Young: But, generally, there's gonna be stacks and stacks of servers. So, if you want to picture your laptop or your desktop or your computer as a server, or even a cell phone as a server, you're gonna have stacks and stacks and stacks of these all networked together so they can handle requests efficiently.
[00:00:15] And servers are particularly built. If you pay money for a server, they're built particular ways that consumer grade hardware is not. For instance, they're gonna have probably error correcting memory. They're going to have faster CPUs than generally are available. They'll have like 40 or 50 core CPUs which, for most people, would be complete overkill because modern software doesn't take advantage of that many cores.
[00:00:40] It's multi threading is hard, totally different course. Is there a course on multi threading? I'm not gonna teach that. [LAUGH] That's gonna be way too hard. But servers are built for these things, and when you run an application on a server, it automatically can fork processes, it can fork commands, it can handle requests in one thread and spin off to another one.
[00:01:01] But servers, essentially, are custom built machines specifically for disturbing files and not necessarily interacting with as much. Servers generally live in a place called data centers. Data centers are these racks and racks and racks and racks and racks and racks machines usually run really, really cold environments, just because computers run hot, servers like to run cold.
[00:01:25] They're usually clean, so not a lot of dust. Imagine if you have, I don't know, what is this like, 10,000 fans running? [LAUGH] And a little bit of dust gets in there, it's gonna ruin your day. So they're generally pretty clean. Security on them is very tight. Think of a bank, and then triple that, and that's what securities on data centers are.
[00:01:44] Because this is information, this is power, this is what the Internet runs on. For instance, a couple of years ago AWS went down. So that's Amazon Web Server, that's one of the biggest hosts in the world. It's what Netflix uses, what a lot of people use. One of them went down and the Internet went down essentially.
[00:02:03] So we think of the Internet as these distributed computers all around the world, but we really are relying on main data centers and different routing networks, backbones. There's like core parts of the infrastructure that if they go down, we're all sunk. But I think the most notable thing that I find interesting about data centers is the amount of power they consume is massive, city scale massive.
[00:02:28] It doesn't look like this, but if you have all these millions and millions of cores running, they're sucking up a lot of power. And what you'll see now is Facebook, they've built their own data centers. Google has their own data centers. Amazon has their own data centers. And they're all specialized machines specifically built for their applications.
[00:02:45] But what a lot of them are doing, which is good, is they're building this renewable energy and they're building next wind farms or something like that because these eat so much power. That's totally a tangent on data centers. But, generally, when you have requests, it's going to hit a data center somewhere.
[00:03:00] Some people like to host their own. We'll talk a bit more about the cloud in a second. But will identify what it looks like. This is the free open source image. The ones from Google are like very impressive. They're much larger buildings. So a data center is just this collection of computers.
[00:03:17] Often, they're shared between different applications, different companies. A lot of times you can rent one server or a fraction of a server with the VPS. Or sometimes you can own an entire data center if you're a big enough company.
>> Jem Young: So let's talk about the cloud. Data centers are newer thinking about computers and data centers are actually fairly modern invention, I say fairly, say 15, 20 years.
[00:03:45] Before if I wanted to run a website or host anything, I had a rack of computers sitting here and literally if someone says the server's down, I had to go plug it back in like that. That was the way servers used to work. Then people said, yeah, that's a hassle, servers are expensive, the hardware can get out of date.
[00:04:02] How do you take a server down without taking everything down? So we have the single data center so someone else can answer someone else's problem at this point, people that are specialized in working with hardware. And the great thing about cloud computing and data centers is they can be in different parts of the planet.
[00:04:20] So if I were hosting this video right now, this course on my laptop, the minute I go to lunch or close my computer, everything goes down. That's not good. And also, if you're in say, Greenland, yeah, if you're in like, say, Greenland, I don't think it's massive scale.
[00:04:37] I'm starting to question this logo now, but let's say you're in London about there. It's gonna take a lot of hops to get over here. So why not have a data center in, I don't know, Africa which is gonna be a little bit closer. You don't have to make the hop across the Atlantic.
[00:04:53] It's gonna be a little bit faster. And that's the advantage of the cloud, is that I can have the same application running in different parts of the world. And it's gonna be a little bit faster and you're gonna reduce that lag if you're a little bit closer. Remember how we ran trace route earlier and it did all those hops.
[00:05:09] You generally want the least number of hops because every hop is the chance for something to go wrong or it's just slower because there's still nanoseconds it takes for a switch to intercept a request and switch to the next one and the next one. But the great thing about the cloud is this idea of elastic computing.
[00:05:28] What is elastic computing? It's kind of what it sounds like but, and you probably hear the phrase a lot, what do you all think it is?
>> Jem Young: Anybody?
>> Speaker 2: Is it scaling, like as needed or-
>> Jem Young: Yes, exactly right, Sam. Yeah, exactly. It's what it sounds like. It's, it's elastic.
[00:05:47] What's great about that is and why data centers are great in the cloud is great is I am I am Mark Urbanski. I am big, powerful CEO Frontend Masters.com, and I'm getting a lot of traffic. It's scaling scaling. In the old days, what I had to do was I had to buy more servers and I had to buy more servers.
[00:06:03] But if you have a data center we can rent out, we can just say like, hey, I need to allocate three more servers. All right, cool. Hit a button. Done. I need to scale down because it's Christmas time and people don't study. They don't do Frontend Masters over Christmas or something.
[00:06:17] We can just scale that back down. So our costs can adjust with the traffic rather than us being fixed with a certain set of hardware that we're paying for, maintaining and things like that. You hear the phrase a lot elastic cloud computing that's what that's referring to. For instance, real life example, Netflix, one of our busiest times a year is Christmas.
[00:06:37] People are home to families and you know what people do with their families, they don't want to talk to them. They don't hang out. So they're all watching Netflix in their room on their phones doing what families do. So, it's one of our busiest times of the year, so what we do is we can set the limits much higher.
[00:06:53] We just scale up our servers. So we just scale up all our servers to handle this additional traffic. And then once traffic starts to ramp down, we just scale this back down. So we're not paying for this unused compute cycles that we don't need. That's really powerful and that's a really new idea in the world of computing.
[00:07:07] It's just like this on demand capacity as we need. But, honestly, most of you, and most people watching this, you're never gonna need a data center with a server. If you do, nice job, you are killing it. You're doing really great if you need an entire data center, but most people, we just need a tiny little fraction of one server.
[00:07:31] Because remember how I said servers have 50, 60 hundred cores, actually don't know what the limit is, probably pretty high, probably in the thousands for you at the supercomputers. Anybody know? It's not important. But what we need is we just probably need a fraction of a fraction of a server.
[00:07:48] And the server we're gonna create today is gonna be one core on one server, which is just like a fraction of a fraction of a fraction of a server. Because that's all we need, and why pay for things we don't need? And that's the idea behind cloud computing in this capacity, you just pay for what you need.
[00:08:05] So what we do is we take a server, we just slice it into little chunks and these chunks can't talk to each other. There's this idea of process isolation, which is you're running I like to party.com. Don't know please don't go there. I don't know what that website is like, I take no responsibility for that.
[00:08:25] But I wanna run Jovian.com, we can run on the same server and we don't even know that either, and we just ran what we need. And that's a really powerful idea that I think is totally underrated.