Load Balancer
Last updated
Last updated
Load Balancers allow you to manage and evenly distribute incoming network traffic across multiple backend instances. This ensures high availability, scalability, and optimal resource utilization for your applications.
Here we will see how to create, configure, and manage load balancers.
Navigate to Network > Load Balancers
Click on Get Started and Create Load Balancer
Button
Enter a unique Name for your load balancer
Select an existing Security Group to manage network traffic permissions
Protocol: Select either HTTP (standard web traffic) or HTTPS (secure traffic). If HTTPS is selected, you should pick an existing SSL certificate for protection
Port: Specify the listening port (default is 80 for HTTP, 443 for HTTPS)
HTTP Headers (Optional):
X-Forwarded-For: Forward client IP
X-Forwarded-Port: Forward original client port
X-Forwarded-Proto: Forward the original request protocol
Configure how traffic is routed to your backend servers:
Algorithm:
Round Robin: Distributes requests evenly among all backend servers
Least Connections: Handles traffic by routing it to the server with the fewest active connections
Source IP: Keeps sessions continuous by matching IP addresses of each client
Session Persistence (Optional):
None: Every request is routed independently
Source IP: Keeps sessions continuous by matching IP addresses of each client
HTTP Cookie: Uses browser-based cookies to manage user sessions
App Cookie: Uses a specific application-level cookie for persistence
Click Add Member to include backend instances and specify their respective ports for traffic forwarding.
Health checks help verify the responsiveness and reliability of backend instances:
Click on Health Monitor Button and configure:
Protocol: Select from HTTP, PING, or TCP
HTTP Method (if HTTP is selected): GET, HEAD, POST, PUT, DELETE.
Expected Codes:
Delay (seconds): Amount of time between each checkup
Max Retries: Retries are performed before an instance is marked as unhealthy
URL: Specify a URL path (e.g., /status) for HTTP checks