When To Use a Load Balancer
TL:DR - Always!!
But really the use of a SpinUp Load Balancer is always encouraged even in a single node or server environment. The main advantage you get is the ability to easily changed backend nodes without needing to wait for Domain Name Service (DNS) propagation of record changes. This is due to how SpinUp Load Balancers are deployed in a High-Availability cluster. The Internet Protocol (IP) Address and Load Balancer configurations will be moved over within seconds when issues arise. You might see a packet or two drop when this occurs. But other than that the backend nodes will keep running and processing without issue.
Below are two scenarios to further explain why using a SpinUp Load Balancer is always a good idea in any environment.
Single Server no Load Balancer
In this scenario you have a single server that is hosting a web site. If issues arise with the underlying hardware for the sever you could see downtime of minutes to hours depending on the issue. With this setup it would take some time to re-deploy the server and switch over the DNS records for the new server IP. As of this time we are not able to move IP’s between resources.
Single Sever With Load Balancer
In this scenario you have a single Cloud Server behind a single Load Balancer. If issues do arise with the underlying Load Balancer it will be migrated to a new hardware cluster. You might see a few packets drop as the networking is brought over. End users should notice no issues and might need to reload the page. Or if there is an issue on the server side you could then redeploy the node and add it behind the existing Load Balancer. After adding this new node your site will be back online and no need to wait for DNS or put any other items on the consumers of your service.
Deploy a SpinUp Load Balancer and continue your journey into the cloud!