Load balancer
As the name says, the load balancer is for balancing the load between a number of servers. If you have a web application that makes your servers high load, you can place a Load balancer in front and spread the load to multiple servers.
You can assign a floating IP (Virtual IP) for the load balancer and the load balancer can communicate/ forward the packets to a particular server as per the distribution method specified.
How does it work?
Load balancer:
The load balancer occupies a port and has an IP address assigned from a subnet.
Listener:
Load balancers can listen for requests on multiple ports. Each one of those ports is specified by a listener.
Pool:
A pool holds a list of members that serve content through the load balancer.
Member:
Members are servers that serve traffic behind a load balancer. Each member is specified by the IP address and port that it uses to serve traffic.
Health monitor:
Members may go offline from time to time and health monitors divert traffic away from members that are not responding properly. Health monitors are associated with pools.
Load Balancer Pools:Default usernames_
A load balancing pool is a logical set of servers, such as web servers, that you group together to receive and process traffic. Instead of sending client traffic to a specific destination IP address specified in the client request, Load balancer can send it to any of the servers that are members of that pool.
Each pool is supposed to use the same protocol and the same port number for load sharing. By default, the protocol (i.e. pool.protocol) is set to “HTTP” which can be customized to “HTTPS” or “TCP” in your setup. The default port number is 80, which also can be modified to suit your service configuration.
Virtual IP:
The Virtual IP (or “VIP” for short) refers to the IP address visible from the client side. It is the single IP address used by all clients to access the application or service running on the pool nodes.
Load balance methodes
The LBaaS service is capable of load balance among nodes in different ways. Valid values for this property are:
ROUND_ROBIN:
The load balancer will select a node for workload handling on a round-robin basis. Each node gets an equal pressure to handle workloads.
LEAST_CONNECTIONS:
The load balancer will choose a node based on the number of established connections from client. The node will the lowest number of connections will be chosen.
SOURCE_IP:
The load balancer will compute hash values based on the IP addresses of the clients and the server and then use the hash value for routing. This ensures the requests from the same client always go to the same server even in the face of broken connections.
Health Monitor:
Since a load-balancer sits in front of all nodes in a pool, it has to be aware of the health status of all member nodes so as to properly and reliably route client requests to the active nodes for processing. The problem is that there are so many different applications or web services each exhibit a different runtime behavior. It is hard to come up with an approach generic and powerful enough to detect all kinds of node failures.
The LBaaS supports 3 types of node failure detections, all generic enough to serve a wide range of applications
PING:
The load-balancer pings every pool members to detect if they are still reachable.
TCP:
The load-balancer attempts a telnet connection to the protocol port configured for the pool thus determines if a node is still alive.
Default usernames_HTTP:
The load-balancer attempts a HTTP request (specified when creating the health monitor) to specific URL (given by user during creation of health monitor) and then determines if a node is still active by comparing the result code to the expected value.
Comments
0 comments
Please sign in to leave a comment.