Load Balancing
Imagine you have a long line of customers. A load balancer acts like a smart organizer, efficiently directing customers to the line with the least amount of people, ensuring everyone gets served quickly.
Let’s consider an example. In this example, the user connects to a virtual server. This can be done in a number of different ways. For the CompTIA exam, you don’t need to know how it works, but later I will go into some of the common methods to help you when troubleshooting.
The next step is the request goes to a load balancer. The load balancer will determine which server the request should be sent to. Depending on the load balancer, it may use a simple system for rotating through the servers to more sophisticated methods which take into account the current load of each server.
This works but can cause problems in some applications if the user is disconnected. When the user reconnects, they may be connected to a different server. To prevent this from occurring, the load balancer may include a persistence mechanism. When this is implemented, the server the user is connected to is remembered. Thus, when the user reconnects, they will connect to the same server again.
For the A+ exam, that is all you need to know, so if you are just studying for the exam, feel free to end the video here. For the rest of the video, I will have a brief look at how load balancing works to help you troubleshoot it when there are problems.
DNS Load Balancing
The simplest form of load balancing is DNS load balancing. This load balancing does not take into consideration server load. Also, DNS servers do not detect if a server is down. In order for it to do this, there has to be some system to remove DNS records when a server is down.
To understand how it works, consider that we have a website on the internet. In order to help deliver content from the website, a copy of the website is created on a separate server. The problem with this approach is that both websites need to be kept in sync with each other. If the website is dynamic in nature, this is harder to achieve, so it works better for websites that are static in nature.
The DNS records for both websites are added to the DNS server. When the user attempts to resolve the DNS name for the website, they will be given one of the website records. It could be either, but in this example, the DNS server is using round robin, which means the DNS server will cycle through the DNS records in order.
When a second user resolves the DNS for the website, the DNS server will give out the DNS record for the copy of the website. This is how simple load balancing works. Let’s consider that we have another copy of the website, but this one is on a server on the other side of the world.
This DNS record will be added to the DNS server. Now, let’s consider we have a third user on the other side of the world. It would make sense for them to use the website that is closest to them. It would also make sense for the other users on the original side of the world not to use the third website and use either of the two websites closer to them.
DNS can be configured so that the location of the request can be taken into consideration. Thus, the third user will always be sent to the third website since that one is closest.
Some cloud websites will use systems like these. The cloud will cache the website on different servers around the world and direct the user to the website that is closest to them. In these locations, there may be multiple servers, and the servers will be rotated through.
If you are experiencing problems and the website is using a DNS load balancing system, try flushing the DNS cache on the computer. This will force the computer to resolve the DNS request again and may send it to a different server that is not having problems.
Auto Client Reconnect
Depending on what load balancing solution you are using, it may have a way of reconnecting the user if the session is disconnected. On remote desktop or Citrix connections, there is an option called auto client reconnect. This setting reconnects a session after a disconnect.
If a user is trying to reconnect after a disconnect and they keep getting a new session, it may be that this setting is not enabled. If the session has crashed, you may want to temporarily disable this setting so a new session is created.
On corporate networks, you may not have access to this setting. If this is the case, the user’s session may need to be ended by a person with appropriate access to the server.
End Screen
How does a load balancer cheer up a sad server? It just makes them happy by lightening their load. Until the next video, I would like to thank you for watching.
References
“The Official CompTIA A+ Core Study Guide (Exam 220-1101)” page 214
Credits
Trainer: Austin Mason http://ITFreeTraining.com
Voice Talent: HP Lewis http://hplewis.com
Quality Assurance: Brett Batson http://www.pbb-proofreading.uk