Welcome to the M365 FM podcast, where we explore the people, ideas and technologies shaping the future of work. Why? Nothing you use online runs on one computer. Your email never lands on just one computer. It lands on a whole crowd of them and you never see which one answered. That's load balancing. And it's the reason teams doesn't fall over when half your company logs in at nine a m. You might think this is deep networking reserved for admins, but it's a simple idea you already use every day. By the end of this, you'll understand how it works and where it's hiding inside Microsoft three hundred sixty five and Azure. Now picture the cloud the way most of us. First imagine it. One giant computer sits in a cold room somewhere, quietly holding everything together. That picture is wrong, and it's wrong in a way that makes this whole topic easier to understand. There's no single computer. There are thousands of ordinary ones, each doing a small share of the work. And something has to decide who does what. Welcome to the M365 FM podcast, where we explore the people, ideas and technologies shaping the future of work. Over the next twenty minutes, the phrase load balancing will stop sounding like something you need a certification for. Think about a shop with one cashier. The moment three people show up at once. A line forms and by the time person ten arrives, the whole place is stuck. Now open twelve lanes and that same crowd moves through without anyone waiting long. Computers have the exact same problem and load balancing is the twelve lanes. This matters the moment more than a few people use the same app at the same time. One machine starts to choke under the weight and every single person feels it. That one problem is what load balancing was invented to solve, and it's been the answer for decades. You've been using it your whole online life without ever seeing its name. Every video you stream, every order you place, and every message you send gets handed to one machine out of many. That choice happens in a fraction of a second, and it happens for you thousands of times a day. We'll also get to the honest limits. The parts many explanations leave out. What a load balancer actually does. A load balancer is a traffic director that stands in front of a group of computers called servers. Every request hits the load balancer first, and the load balancer hands that request to one server in the group. To you it looks like one address and one front door. And you never know or care which machine did the work. Think of the host at a busy restaurant. You don't wander in and grab a table yourself. The host looks at what's free and walks you to a spot, so no single waiter ends up carrying the whole room. Follow one request all the way through. You tap a link and your device sends a request to the load balancer. The load balancer picks a healthy server and that server sends the answer back. The whole decision takes a fraction of a second, and then it happens again for the next request and the one after that. What you get out of this is really two things. You get speed because the work spreads out. Instead of piling onto one machine, you also get staying power because if a server is slammed or dead, traffic simply goes somewhere else. The load balancer is also why a website can get updated without going offline. You pull one server out, patch it, put it back, and the rest keeps serving people while you work. Nobody outside notices a thing. The workload here just means work. Balancing the load means making sure no single machine carries more than its fair share, which is the whole job in one sentence. The load balancer is the only thing the outside world ever talks to, and that's what keeps the pool behind it. Invisible users see one name and one door, while behind that door the number of machines can grow or shrink without anyone ever knowing. the part people assume is complicated is how the load balancer picks a server. And that's exactly where we're headed next. The simple rules that decide where traffic goes. When a request arrives, the load balancer has to pick a server, and it does that using a rule called an algorithm. An algorithm sounds intimidating, but it just means a set of steps for making a decision. A recipe is an algorithm, and so is the way your phone picks a route around traffic. The simplest rule is called round robin. The load balancer takes turns. It sends the first request to server one, the second to server two, the third to server three, then loops back to the start. It's like dealing cards around a table, and it works well when all the servers are about the same. The next rule is least connections. Instead of taking turns, the load balancer sends each new request to whichever server has the fewest people already connected. That's the same instinct you use at the supermarket, where you pick the shortest line instead of the closest one. Some setups use weighted versions of these rules. If one server has more memory or a faster processor, you give it a bigger share of the traffic. It's like a larger checkout lane handling more cards per hour. One more rule is worth knowing, and it's called least response time. Instead of counting connections, the load balancer watches how quickly each server is answering and sends the next request to the fastest one. That's the friend who always knows which checkout line is actually moving, not just the shortest one. Now these rules split into two families and the split matters. One family follows a fixed plan and never looks at how busy the servers actually are, which makes it simple to set up, but easy to get wrong when the load is uneven. The other family watches the current load and health of each server and adjusts on the fly, which handles messy real life better but takes more tuning to get right. Picture a small business website running on three identical servers. Round robin is plenty there, and anything fancier is wasted effort. Now picture a video app where one request takes a blink and the next takes 10s leased connections keeps a server from getting stuck holding all the slow ones while another one sits idle. All of this only works if the load balancer knows which servers are actually alive, and that question turns out to be more interesting than it sounds. How it knows a server is sick. A rule for choosing servers is useless if some of those servers are broken, so the load balancer runs health checks. A health check is a small regular test sent to each server, like knocking on the door and asking if anyone's home. If the server answers the way it's supposed to, it stays in the rotation. And if it doesn't, the load balancer stops sending it new traffic. That switch, moving traffic away from a failed server and onto a healthy one is called failover. It's the part of load balancing that keeps a small failure from becoming a big outage, because one dead server should never be able to take the whole app down. Think back to the shop with four lanes. One cashier steps away, the lane closes and a sign goes up so nobody lines up there. Customers flow into the open lanes instead and from their side of the counter, nothing has changed at all. There's a real trade off hiding in the details. If the load balancer checks too rarely, a sick server keeps getting traffic for a while before anyone notices. If it checks too aggressively, a server that's just a little slow gets yanked out of the rotation, which can make things worse instead of better. Azure shows how this works in practice. It's load balancer checks each backend on a set interval five seconds by default in the portal, and it needs a certain number of failures in a row before it marks the server unhealthy. When it does, new connections go elsewhere, while existing ones often keep running, so people in the middle of a task aren't cut off. There's an honest limit here. A health check only knows what you tell it to test. If it checks the wrong port or a shallow signal. A server can be sick and still look perfectly healthy, which means it keeps getting traffic it can't handle. The better your health check reflects what your users actually experience, the better the whole system behaves. Get that one detail right and plenty of other problems quietly disappear. So far, we've treated every load balancer as the same kind of tool, and that's the next thing to fix. Two flavors. And why the difference matters. Not every load balancer works the same way, and the difference is in how much of your request it bothers to look at. Some only glance at the outside of the envelope, and some open it up and read the letter inside. The first kind works at what's called layer four. It looks only at the address and the port the same way. A mail sorter reads a zip code and it forwards the request without caring what's inside. It's fast, it's simple, and for a lot of jobs, it's all you need. The second kind works at layer seven and it actually reads the request. It can see that one request is asking for an image, while another is trying to check out, and it can send each one to a different team of servers. That's how a single web address can quietly route you to the right place based on what you asked for. A concrete example makes this click. A request for your site's images, goes to the picture servers, and a request for the checkout page goes to the payment servers, all behind the same web address. Nobody typing that address has any idea. Two different teams just handled them. Layer seven also unlocks a few things that matter in the real world. It can handle your security certificates in one spot instead of on every server, and it can inspect incoming requests and block the nasty ones before they ever reach your app. The trade off lands here. Layer four is the fast, cheap, no frills option, and layer seven is the smarter one that costs a little more work on every request. Neither wins in every case, and picking between them really depends on how much you need the balancer to understand what you're asking for. In practice, plenty of real systems use both at once. A layer seven balancer makes the smart routing call at the front, and a layer four balancer spreads the raw traffic across the machines behind it, each one doing the job it's best at. With those two flavours clear, we can finally name the actual tools you'll meet in Azure because Azure doesn't hand you one. It hands you a whole family. Where this shows up in Azure. Azure doesn't have one load balancer. It has a small family of them, and each one is built for a different job. Picking the right one comes down to two simple things. Whether your traffic is web traffic and whether your app lives in one region or spread across the world. The first one is simply called Azure Load Balancer. It's the fast plain member of the family. It works at layer four. It spreads network traffic across virtual machines, and it's built for enormous volume with very little delay. It also spreads across availability zones, which are separate physical locations inside a region. So one zone failing doesn't take the whole thing down. Next is Azure Application Gateway, the smart regional one. It works at layer seven so it can read your URLs, route by path, handle your security certificates, and add a web application firewall. Reach for this when your app lives in one region, but you need it to make a decision about each request that arrives. Then there's Azure front Door, the global one. It sends each user to the closest healthy entry point on Microsoft's network, handles security at the edge, and caches content, so repeat visits come back fast. Microsoft says it runs across more than one hundred and eighteen edge locations, spread across about one hundred metro areas around the world. Last is Azure Traffic Manager, and it works differently from all the others. It doesn't carry your traffic at all. It just answers the question of where your app lives by handing your device the address of a healthy location, and then your device connects straight to that server without traffic manager ever seeing the traffic. That difference matters more than it sounds, because Traffic Manager only points the way the traffic runs straight from the user to the server, which keeps it fast. But it also means the failover depends on how quickly devices refresh their memory of that address, different as they sound. All four answer the same basic question. They decide which healthy machine should get the next request, and they check that it's still healthy before they send anyone to it. The detail worth remembering is that a real workload often uses more than one of these at once. Picture a company running a website for customers worldwide. Front door gets each visitor to the nearest region application gateway, routes them by URL inside that region, and load balancer spreads the work across the virtual machines behind it. Three tools, three jobs, one smooth experience for the person clicking. And the good news here is that we'll never have to build any of this to benefit from it. How Microsoft three hundred sixty five quietly does this for you. You'll probably never configure a load balancer in your life, and you're already depending on thousands of them. Every time you open outlook, join a teams call or pull up a file in SharePoint, you're leaning on this exact machinery and it's all happening out of sight. Microsoft three hundred sixty five runs its services in what's called an active and active design, which means several copies of a service are always running at once in data centers spread across the world. When you connect, your traffic comes in through Microsoft's front door service and gets routed to the best working copy around any failures along the way. That routing is the same idea we've been talking about all episode, just at a scale most of us never see. You don't pick a data center and you don't know which one answered. Microsoft systems make that choice for you thousands of times a second, and you only notice when it stops working. Nobody gets assigned a fixed server to call their own. Every request is placed fresh each time by systems built to keep going. Even when a whole data center has a bad day. There's a second layer of care in how updates get released. Microsoft roles changes out in rings, starting with a small group inside the company, then all one hundred and forty thousand Microsoft employees, then early adopters, and finally everyone. If something breaks, it breaks for a small group first, where it can be caught before it ever reaches your inbox. The pieces are also kept apart on purpose. A problem with exchange doesn't break core teams, and a search issue in SharePoint doesn't stop you uploading a file. That separation means one sick part can't drag the rest of the service down with it. It works like a hotel that never runs out of rooms. You ask for one, you get one, and you never find out which floor the other guests landed on. So the next time teams just works on a busy Tuesday morning, you'll know a little of what's going on underneath. A lot of quiet traffic directing is happening so that nothing ever feels busy at all. That's the upside. And it's real. Now for the honest part, because load balancing isn't a magic fix for everything. What load balancing can't fix it. Solves one problem really well, and the edges of that are worth knowing, so you don't expect more than it can give. Start with the balancer itself. It can be a single point of failure. And if you run only one and it goes down, everything behind it becomes unreachable, no matter how healthy the servers are. Real setups, run balancers in pairs, or use managed services that are already built to be redundant, which is one reason cloud providers take this worry off your plate. More servers also doesn't automatically mean more speed if your app shares data badly or your database is the real bottleneck, adding machines can just spread the same problem around. You can have twenty servers and still be slow because the queue isn't at the front door. Health checks have a soft spot too, since they're only as smart as what you tell them to test. Point a check at the wrong thing and a broken server keeps its place in line. That's a configuration mistake rather than a flaw in the idea, but it's a common one. Timing is the last one to know about when the balancing happens through DNS. The address book that turns a website name into a location. Your device remembers that answer for a while. Because of caching, that memory means a failure can take longer to route around than it would with a proxy sitting right in front of your app. The beginner mistake I'd most like you to avoid is assuming that adding a load balancer automatically makes you highly available. It's one important piece of the picture, not the whole guarantee. And the rest of the picture is your app, your data, and how you set it all up. None of these limits make load balancing a bad idea. They just mean it's a tool with a job. And like any tool, it works best when you know exactly what that job is. The recap. And one question for you. So to bring it together, load balancing is sharing the work across several computers. So no single one falls over a load balancer is the traffic director that picks a server, checks that it's healthy, and reroutes when it isn't. In Azure, that's a small family of tools. Load balancer. Application gateway, front door and Traffic manager. And Microsoft three hundred sixty five already runs on all of it, so you don't have to think about it now. I have one question for you. Which tool you use every day? Did you not realize was quietly relying on load balancing? Think about it and let me know if this made the topic feel less intimidating. Subscribe to M365 FM. To master the tools and the mindset shaping the future of work.