How does Load Balancing Work (F5 Load Balancing)

Anyone have experience with the F5?  What does load balancing do?  How does it work?
To me, the solution to load balancing is to buy another machine.  Why is buying a load balancer a better idea?
Who is Participating?
Jordan MedlenConnect With a Mentor Commented:
Aside from specifically F5, load balancers, now considered application delivery controllers help balance resources as well can provide high-availability for applications and content delivery.

Load balancing a website hosting content can extend the requests across multiple servers and can be done using DNS having multiple A records. The problem is that if a server has too many requests going to it, sucking up cpu and ram, DNS has no clue and may not provide every user with a great experience.

Load balancers, or application delivery controllers, on the other hand can perform health checks, as well as balance the load using different algorithms, from least weighted to round robin, etc.

These dedicated devices can be configured in high-availability mode as well, so if an ADC should fail, the other will continue to deliver access to whatever the configured application is.

Now the how. They work most typically by creating a "pool" of resources. Real servers are defined and placed in this "pool". Health checks are also defined so that as resources become unavailable, they can be pulled from the "pool". Now, defining those resources doesn't do us much good if we don't have a simple way to point to them. We do this by creating a VIP, or virtual IP address. We point DNS entries to this VIP and configure other applications to use this VIP as well. The ADC will then take requests to the VIP and distribute the requests among all servers define in the resource pool, based on whatever the configured algorithm is.

Lastly, there are a couple of ways that the real servers respond to the request. In many cases, NAT (network address translation) is configured, and the ADC acts as firewall or gateway device. The ADC can also sit off to the side, instead of inline, and servers can respond directly to client requests. This is called DSR, or direct server response. This is decided in the design phase, and can have great impact on the application you are implementing.

This is just a nutshell synopsis on load balancers, or ADCs (application delivery controllers). Hope this helps.
Will SzymkowskiConnect With a Mentor Senior Solution ArchitectCommented:
Load balancing is used when you want to balance the load between 2 nodes. You have to have 2 machines by default to load balance. Simply setting up 2 nodes that are identical does not provide load balancing. This would simply be 2 identical nodes which are independent from each other. Using and F5 load balancer has intelligence behind it, meaning you have 2 or more nodes that use 1 logical IP called a (vip virtual IP).

The VIP is used as the connection point and then then VIP has a pool of nodes assigned to it. F5 can determine weather a service has gone down or a failure has happened. This is useful when you have clients connecting to a VIP which has 2 or more nodes. If one node fails the F5 load balancer detects this and can automatically redirect clients to the node that is online.

If you didn't have a load balancer clients could connect try and connect to the failed node and not get any further. This makes it seamless to the end user.

There are several other ways to manipulate a load balancer depending on your needs. Take a look at the below link which will provide more detail.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.