#loadbalancer #loadbalancing #devops #sre #python #code #pythonprogramming
A load balancer is a networking component that's used for distributing network traffic across multiple servers in order to horizontally scale web-based applications. There are many popular ones out there such as Nginx, HAProxy, and Traefik, to name a few. We'll touch on open source load balancers in the final chapter of this course. Until then, we'll implement our own.
As users visit our imaginary website that people purchase mangos from, www.mango.com, during peak time, one server can struggle to keep latency low while also staying available for traffic. The server itself has a finite amount of memory and CPU, so as traffic increases the single server starts to struggle. In order to cope with the additional traffic we can add two more servers and front them with a load balancer.
The load is distributed across the servers and we can keep scaling by adding more servers or even start splitting functionality by adding microservices into the mix. In practice, the load balancer acts like a proxy fronting the underlying servers (or backends). As you continue working your way through this course, we'll go through more concepts related to load balancers and their usage.