Check out a free preview of the full Full Stack for Front-End Engineers, v3 course
The "Server Management" Lesson is part of the full, Full Stack for Front-End Engineers, v3 course featured in this preview video. Here's what you'd learn in this lesson:
Jem discusses the limitations of local server hosting, server management, data centers, cloud computing, and virtualization. Most modern systems utilize cloud hosting providers instead of putting resources into managing servers in their own data centers.
Transcript from the "Server Management" Lesson
[00:00:00]
>> All right, so you did it. You wrote a server. All right, let's go. No, no, no, no. So we touched on this earlier, but why can't we just run this? Why can't I just build an application based off my local host running a server? Well, one we talked about that availability.
[00:00:18]
That it's just not gonna run forever. The OS needs an update here, I need to close my laptop, I wanna use something else. I wanna use the memory for playing a game or something like that. So maybe our laptops probably aren't the best server. Another consideration is, how are you all gonna work on this?
[00:00:36]
This is great for me as a single developer, but how are you gonna run this server? I guess you can copy it and then we can both iterate on it same time, but that's gonna get messy and then we can't use the development server, it's probably not gonna work well.
[00:00:51]
And then how do we scale this? Buy more laptops? I mean, sure, if you're rich, but that doesn't seem like a good solution either. Servers as we said, the core tenet is they have to be 100% available. If your web page is down, your application is down, that's costing you money, it's costing you users.
[00:01:08]
It's defeating the purpose of writing the application itself. So we talked about servers. It's always more than one. That you never had just had one server. You have redundancies built in, you have things for accounting, for fail overs, for power outages, for updates. Half your servers' down for update, the other half stay up to respond to requests, that's known as red and green.
[00:01:31]
There's different strategies for updating your servers, things like that. But, it's a whole big world of server management and developer operations. This whole world that's probably hidden from most of us as frontend engineers, where we never thought, yeah, what is powering all these things? What are the rules that govern this?
[00:01:49]
So, it used to be in the old days, and by old days, I mean, like ten years ago. You can just get away with running a server firm in your company's basement. And a lot of companies still do. A lot of like Goldman Sachs, the financial companies, they have server firms that look like this, usually in the bottom part of their building or in a fireplace, a very fire [LAUGH] resistant place because servers run very hot.
[00:02:14]
And that's fine. Generally when we think of as developers, you're probably not running a server rack in your kitchen or in your living room. Some people do, some people run things like open NAS or something like that for serving, or Plex for serving their media. You can do that as well.
[00:02:30]
But, when we're talking web applications, you're not gonna run a server from your corner of your room. Cuz, get some plugs, everything goes down, people are mad at you. But a lot of companies you'll see have something like this. What we use today is actually what we'll call, it's called cloud computing.
[00:02:50]
So this idea that there's a giant data center somewhere, a giant server firm somewhere. And I could just buy time on those servers, I can buy resources. And this is one of the bigger innovations when it comes to web development. Because, say 20 years ago, this wasn't a thing.
[00:03:07]
Everybody was running their own server. Everybody needed their own IT person. They needed their own sysadmins. It was a pain in the butt to do this. Now, we can firm all that work out to companies and people that know what they're doing a lot better than we do.
[00:03:22]
Companies like AWS, or DigitalOcean, or Rackspace, or a lot of cloud hosting providers. And that's all cloud computing is. It's just the idea that there's this massive pile of servers somewhere and we can borrow some time from them or we can install our applications on that. Nothing fancy, nothing special about it, but people like to use cloud computing as a buzz term when that's all it is, just renting server time.
[00:03:48]
The secret that makes cloud computing work these days, is this concept of virtualization. That's dividing the resources into a virtual computer. So instead of, well, say a 32 core intel processor, where in the old days I had to rent that entire thing. Whether or not I needed it or I just wanted to run a very, very simple note server.
[00:04:09]
I had to rent the entire thing. Now, I can buy just one core of that computer. So now that 32 processor computer, is 32 different virtual computers. This is a really powerful concept and it's actually very difficult. Because computers originally were not built for this, they're built to do multi-processing, multi-threading.
[00:04:30]
And this concept of taking one thread to one core was totally foreign. So the early days of cloud computing were very bumpy, there are a lot of issues that have been solved now. Some of that we talked about earlier which, there are special processors that excel at doing virtualization.
[00:04:46]
They excel at doing this one thread, one core type idea. There's the concept of virtual machines, which is literally an entire computer virtualized. So that means the memory, the hardware, the GPU, all of the parts of your computer that make it run, we can pick a virtual version of that.
[00:05:04]
So it's literally a clone of your computer. We don't tend to do that as much these days because virtual machines are very expensive as you can imagine, me cloning my laptop and then putting another version of it back onto the hard drive, takes up a lot of resources.
[00:05:16]
So it's less than ideal, but sometimes you need an exact copy of what's going on. But we'd really, what we're gonna do next is we're gonna buy our own server. That's called a VPS, a virtual private server. Why is it virtual? Because it's not real, it's totally made up.
[00:05:32]
We can buy four cores, we can buy one core, it's all virtual. But this is the secret to kind of how all modern applications, whether it's Netflix, or Facebook, or any applications, they all use VPSs. Facebook use their own hardware, really different case. But all modern web applications use some sort of VPS, a virtual private server.
[00:05:57]
So we'll take a pause here because we're about to go deep. We're about to go deep, deep, deep in SSH and hashing. It's a lot of fun, but this is where it starts to come all together. So, so far we've learned terminals, command line, how to edit a file, what a server does and how to create one, in a couple of lines.
[00:06:16]
Next, we're just gonna buy one. Why create one locally? We're just gonna buy a server. We're gonna pick the operating system. We're gonna figure out why we're picking that operating system. We're gonna talk about how to log in, how to authenticate ourselves. Which is its own fun topic, I'm really excited for that one.
[00:06:32]
And then you'll have your own server running in a cloud somewhere in the world. This little tiny chunk of real estate that you can do whatever you want with. And from there, we're really gonna start going to places you probably have not seen before. So I'm really excited.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops