From the course: CompTIA Network+ (N10-009) Cert Prep
Load balancing
From the course: CompTIA Network+ (N10-009) Cert Prep
Load balancing
- I'm really excited because I've got myself a web server serving something cool, whatever it is. You know, the new mic, web app or whatever it might be. So I'm real happy with my web server. In fact, I'm just going to put www up here to remind us it's a web server. I'm so happy with my web server because more and more people are accessing my web server and after a while I need some help because I've got so many people accessing my web server that it's slowing this guy down. So what I need to do is come up with a way to have lots and lots of web servers. But if I have lots and lots of web servers, they have to be giving out the same thing and they have to be doing it at the same time. And there could be a lot of challenges. So what we're going to talk about in this episode is load balancing. Load balancing simply means to be able to have lots of servers giving out the same thing and to do it in a nice, even way. We're going to be using web servers here, but it's not limited to web servers. There's all kinds of stuff that uses load balancing. But let's stick with the web, 'cause everybody's comfortable with that. So the first thing that's going to be happening here is I'm going to start adding more servers. Now, as I add more servers, these servers are passing out the exact same thing, the exact same web pages. Now, let's assume for a moment that these web servers are physically in the same room, okay? And what I want to do is I want to have the ability to not overload any one of these, to space out the requests across the three servers. Now, there's a lot of different ways to do this, load balancing. The first way I want to talk about, it's kind of an old fashioned way, but it's on the exam, so it's worth mentioning. And that's using a DNS server. So I've got a DNS server someplace else that's actually the authoritative server for this particular domain. And what we're going to do is we're going to put stuff inside the DNS server to kind of fool people. So I'm going to call this WWW1, WWW2, and WWW3. And what I can create is a lookup zone that does something very, very interesting called round robin. With a round robin, what I'll do, I'm going to have all three of these guys in a lookup zone, and I'm going to have a kind of a special DNS server. And what this DNS server does is that when a request comes in, first, he gives it to number one, the next request comes in, then he gives it to number two, next request comes in, then he gives it to number three. This is about the first generation of load balancing called round robin, and it worked okay, but there were some problems with it. For example, remember that if I, as a client, access this website, I'm going to cache the IP address. So what will happen is next time I try to get to this particular site, I'm not even going to use this DNS server. I've already got, say, this guy's IP address. So round-robin load balancing was kind of the first generation, had a few problems, but they worked on it. The other big issue that comes into play with load balancing is what if all these computers are in different continents? Now, this is a big thing that a lot of us do, because it's a lot faster to get to a physically close server than one that's far away. So the other thing we'll do is another DNS feature called delegation. Here's my eraser. With delegation, what we'll do is we'll set up another zone, but it's going to have sub-zones for each of these. And most importantly, it's going to have a reverse lookup zone with different PTR records for each of these. Now, this does something really interesting in the world of DNS. What'll start taking place is if I have some client over here, when he comes in, just tries to query to this guy, he's going to try to get to the zone that's closest to him. And what will happen is you'll have this DNS server and another DNS server someplace else, and they'll actually compete for resolving to that particular DNS. And what will happen is, based on the amount of time to get on the pointer value, you really end up going with the closest one. And this is a very common way to handle load balancing, just using DNS. The problem with DNS load balancing is that you're counting on a third tool, DNS, to do what you need to do. So a lot of times what will happen is that we will dump DNS completely and instead do what's known as server-side load balancing. Server-side load balancing usually involves some kind of very, very smart device running very, very smart software that is physically at the location of your servers. There's some real benefits to having your web servers or whatever servers you might have at the same physical location. One big benefit is we can take advantage of something called clustering. With clustering, what we'll do is we will have separate machines, or at least separate virtual machines, but what they'll do is they will actually talk to each other on the backend. They will have their own little private network. And what this little backend private network does, separate network cards and everything, make sure that all three of these systems are absolutely identical at all times. For example, if you have a database involved or something like that, these guys can all update each other. Even more interesting, when you're using clustering, you can usually offload all of your data to a separate device. And all three of these will simply just read off that. So if you add a new game or if you add a new customer record, you're not trying to add it to three different machines, you're just adding it to one database. So clustering is a huge benefit. So when we're doing server-side like this, we get some other really cool features. First of all, this smart box, this load balancer, can actually talk to these guys individually, and by talking to them individually, we can do some cool things. Cool thing number one, he can actually query and go, "Are you busy right now?" He can see who's the least busy and then send that data over to that particular machine. If a machine goes down, he can automatically reroute without any problems whatsoever. This guy can even act as a proxy server. For example, this box right here can handle all the SSL, if you're on a HTTPS website, he can be a certificate server and handle all this and take that load off of these individual machines. So load balancing is an incredibly powerful tool. Now, right here, you'll notice I'm showing this as a box. What's fascinating in today's world is that most people, if you have a website anymore, it's probably going to be on the cloud. So what will happen is you'll have three or four instances of your particular web app, your webpage, whatever it might be, and even the load balancer these days is virtualized. So all of this is really nothing more than software. And where it's running, we don't care, because the beautiful part about it is that load balancing works. Now, there's some features about load balancing you need to be careful about. Let's just say for example, I'm a client and I get assigned to this machine. Well, if I'm assigned to this machine, I might have some certain things going on at any given moment that I want to get back to that machine. And even though the load says, "Oh, he's the slow one now," a good load balancer will sit there and go, "Ah, you have a session with this particular client. As long as your session lasts, I'm not going to move you to another machine. I'll keep you on that machine until your particular session is done." So this is just a real basic idea of load balancing. It's a fascinating world and you get to add all kinds of interesting boxes to your network to take care of these things. But do keep in mind that there's really two big chunks to load balancing, at least for the exam. There's going to be DNS solutions and then server-side solutions. Make sure you're comfortable with those two.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
Switch management8m 49s
-
Introduction to VLANs10m 7s
-
InterVLAN routing2m 56s
-
Configuring switching technologies7m 25s
-
Trunking7m 39s
-
Cisco commands9m 2s
-
Switch port protection6m 28s
-
Port mirroring3m 19s
-
IDS vs. IPS4m 15s
-
Proxy servers12m 31s
-
Load balancing8m 19s
-
Device placement scenarios12m 37s
-
-
-
-
-
-
-
-
-