Imagine you get more traffic on your site and load increases on your server. You add one more server to handle the traffic and support the server. As you get more traffic you will notice the servers going down even though you have sufficient processing power.
Why is that? It is because the traffic is not evenly distributed between them. So if one of the servers gets more traffic than it can handle the server will crash. Now, to balance the requests and distribute load among these servers we use load balancers.
After knowing load balancers, it is simple to understand Load Balancing. Load balancing is evenly distributing network traffic among the servers by considering their availability. Load balancing guarantees client requests equally spread across all servers which in turn makes sure that the site is up and improved response time.
miniOrange HTTP load balancer helps you achieve better performance on your systems, fast server responses, 100% utilization of all the available resources.
miniOrange load balancer support session handling with Sticky Sessions or Session persistence
Sticky Sessions or Session persistence refers to redirecting a clients requests to the same backend server or application server for the duration of a browser session or until the completion of a task or transaction. You can also choose the specify duration-based session stickiness.
Using sticky sessions can help improve user experience and optimize network resource usage.
This method is suitable in the case where all the servers are of equal processing capacities. In this method load balancing algorithm list the available servers. The client requests will handle using this list. The request will hand over to the servers listwise.Let us understand this with an example: Suppose there are 4 servers s1,s2,s3,s4 and r1,r2,r3, and so on are upcoming requests.
Following will be the flow for upcoming requests:
Summarising the above load balancing algorithm will:Server s1 will handle r1,r5,r13,r17 and so on
This method is suitable in the case where all the servers are of different processing capacities. Sometimes it happens that the capacity of handling the requests varies in available servers.
Suppose there are 3 servers s1,s2,s3 and r1,r2,r3 and so on are upcoming requests.
And request handling capacity of the servers is s3>s2=s1.
Here s1 and s2 have less capacity while s3 has more capacity.
Summarising the above load balancing algorithm will:
This method is suitable where client connections persist for a long duration of time. The load balancing algorithm keeps the track of active connections of each and every server. The load balancer sends a new request to the server which has fewest active connections.
Here the least connection method algorithm is extended for better performance. The load balancing algorithm keeps track of one more parameter i.e. response time. The load balancer sends new requests to the server which has fewest active connections and lowest response time.
This method is suitable where the requested IPs are of a predefined range. IP Range is divided into the no. of parts equal to the no. of servers. Load balancer checks the new request’s IP and sends the request to the respective server.
This method is suitable for the traffic with a lot of variations in requested IPs. In this method hash of the requested IP is calculated and then the request is redirected to the specified server.