Load Balancing

Information about the creation and management of load servers,

Applications installed in a load balancer

  • Nginx

  • Memcached

  • Redis Server

  • UFW Firewall

How does a load balancer work

Load balancers distribute incoming traffic across multiple servers, ensuring no single server becomes a bottleneck.

By balancing the load, your application can handle more users simultaneously without slowing down, if one server goes down, the load balancer redirects traffic to other servers, ensuring continuous uptime.

Methods

You can configure your load balancer using any of these 3 methods

  1. Round Robin: This method distributes incoming traffic sequentially across all available servers. Each server takes turns handling requests, ensuring an even distribution of the load.

  2. Least Connections: This method directs traffic to the server with the fewest active connections. It's ideal for maintaining balance when servers have varying processing capabilities or workloads.

  3. P Hash: This method uses the client’s IP address to determine which server will handle the request. It ensures that the same client is consistently directed to the same server, which can be useful for session persistence.

SSL

Usually, SSL certificates are set up on each application server individually. However, when employing load balancing, it's essential to configure the certificate on the load balancer directly.

When configuring your site load balancer, you can specify the port and weight.

Last updated