This article explains how the Cloud Load Balancer works at HOSTDOG, when to use it, and how to configure it to distribute traffic across your servers for improved performance and availability.

What is a load balancer?

A load balancer sits between your visitors and your servers. It receives incoming requests and forwards them to one of several backend servers based on a distribution algorithm. This provides two key benefits:

  • High availability — If one backend server goes down, the load balancer automatically routes traffic to the remaining healthy servers
  • Better performance — Traffic is spread evenly, preventing any single server from being overwhelmed during peak hours

When to use a Cloud Load Balancer

Consider adding a load balancer when:

  • Your application runs on two or more Cloud VPS or dedicated servers
  • You need zero-downtime deployments (rolling updates across servers)
  • Your website experiences traffic spikes that a single server cannot absorb
  • You need geographic redundancy for disaster recovery
  • Your SLA requires high availability (99.95%+ uptime)

If your application runs on a single server, scaling your Cloud VPS resources is usually more cost-effective than adding a load balancer.

Set up the Cloud Load Balancer

To set up a Cloud Load Balancer for your HOSTDOG servers, contact our support team with the following information: [VERIFY: whether load balancer is self-service or support-configured]

  • Backend servers — The IP addresses of the servers you want to include in the pool
  • Protocol — HTTP, HTTPS, or TCP depending on your application
  • Health check — How the load balancer should verify that each backend server is healthy (e.g., HTTP check on a specific URL)
  • Distribution method — Round-robin (default), least connections, or IP hash

Distribution methods

Method How it works Best for
Round-robin Requests are distributed evenly across all servers in sequence General-purpose, evenly-specced servers
Least connections New requests go to the server with the fewest active connections Applications with varying request durations
IP hash Requests from the same client IP always go to the same server Session-based applications without shared session storage

Health checks

The load balancer continuously checks whether each backend server is responsive. If a server fails the health check, it is temporarily removed from the pool until it recovers. Common health check configurations:

  • HTTP check — The load balancer requests a specific URL (e.g., /health) and expects a 200 OK response
  • TCP check — The load balancer verifies it can establish a TCP connection on the specified port

Health checks ensure that visitors are never routed to a server that is down or experiencing issues.

SSL with load balancing

For HTTPS traffic, you have two options:

  • SSL termination at the load balancer — The load balancer handles SSL encryption and forwards unencrypted traffic to backend servers. Simpler to manage, reduces CPU load on your servers.
  • SSL passthrough — The load balancer forwards encrypted traffic directly to backend servers, which handle SSL themselves. More secure end-to-end, but requires SSL certificates on every backend server.
Need Help? If you need assistance setting up a load balancer for your servers, our support team is available 24/7. Navigate to the HOSTDOG homepage and click the Log in button to open a support ticket and we'll assist you promptly.