O'Reilly logo

Distributed Computing with Go by V.N. Nikhil Anurag

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The load balancer

A load balancer is a type of HTTP server responsible for distributing traffic (routing) to various web servers based on the rules defined by the developer. A load balancer, in general, is a very fast and specialized application. Trying to implement similar logic in a web server might not be optimal because the resources available to your web server have to be split between handling requests for your business logic and requests that need to be routed. Also, a load balancer provides us with a lot of features out of the box such as these:

  • Load balancing algorithms: The following are some algorithms for load balancing:
    • Random: Distribute randomly across the servers.
    • Round robin: Distribute equally and sequentially across servers. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required