O'Reilly Site Reliability Engineering Chapter

Learn all you need to know about email best practices, deliverability, and tools with email whitepapers and ebooks.

Issue link: https://hub.dyn.com/i/961134

Contents of this Issue


Page 6 of 14

CHAPTER 19 Load Balancing at the Frontend Written by Piotr Lewandowski Edited by Sarah Chavis We serve many millions of requests every second and, as you may have already guessed, we use more than a single computer to handle this demand. But even if we did have a supercomputer that was somehow able to handle all these requests (imag‐ ine the network connectivity such a configuration would require!), we still wouldn't employ a strategy that relied upon a single point of failure; when you're dealing with large-scale systems, putting all your eggs in one basket is a recipe for disaster. This chapter focuses on high-level load balancing—how we balance user traffic between datacenters. The following chapter zooms in to explore how we implement load balancing inside a datacenter. Power Isn't the Answer For the sake of argument, let's assume we have an unbelievably powerful machine and a network that never fails. Would that configuration be sufficient to meet Google's needs? No. Even this configuration would still be limited by the physical constraints associated with our networking infrastructure. For example, the speed of light is a limiting factor on the communication speeds for fiber optic cable, which creates an upper bound on how quickly we can serve data based upon the distance it has to travel. Even in an ideal world, relying on an infrastructure with a single point of fail‐ ure is a bad idea. In reality, Google has thousands of machines and even more users, many of whom issue multiple requests at a time. Trac load balancing is how we decide which of the many, many machines in our datacenters will serve a particular request. Ideally, traffic is distributed across multiple network links, datacenters, and machines in an "opti‐ 1

Articles in this issue

view archives of eBooks - O'Reilly Site Reliability Engineering Chapter