Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Load Balancing

Load Balancingfooter line

 

Load balancing is one of the establishing mainstays of distributed frameworks. A load balancer conveys a bunch of given tasks adequately across a bunch of servers, intending to make the complete process much more efficient.

Load Balancing is characterized as the precise and proficient circulation of organization or application traffic across numerous servers in the ranch. Each Load balancer sits between the customer and the backend, accepting and afterward disseminating approaching requests to any accessible server that is fit for completing them.

By spreading the work b/w the servers evenly, load balancing helps to improve application responsiveness. It also increases the availability of applications and websites for a large number of users.

 

Where can a Load-Balancer be placed in a system?

Now we need to know the workloads that we can load balance? That is, where can a Load-Balancer be placed in a system for its high performance?

 Load balancers are usually placed between:

  • The user application/client and the web-server

  • The Web-Server and the Application/Job servers

  • The Application servers and the Cache Servers

  • The Cache Servers and the Database Servers

Depending upon your system requirements, you may place the load balancer in any of these four layers in your system, depending upon its necessity. 

Load balancing at each layer builds accessibility, execution, and adaptation to internal failure, yet it likewise presents greater complexity in the framework. Greater intricacy ordinarily means more expense and upkeep overhead over the long haul.

 

Types of Load-Balancers

Load balancing can be done in three following ways:

  • Use of Software Load balancers in clients that request data from multiple servers.

  • Use of Software Load balancers in the services layer.
  • Use of Hardware Load balancers in the service layer.

 

Software Load Balancers in Services

  • Client requests are disseminated based on specific rules in a software load balancer.

  • Software load balancers do not require any specific types of hardware or Load balancing particular workload types.

 

Software Load Balancers in Clients

  • Load balancing logic resides on the client application. 

  • The client application can choose the server with which it wants to communicate when starting from a list of web servers/application servers. 

  • The client app selects the starting one in the list and requests data from the server.

  • If a failure is detected persistently (after several tries), it marks the first server as unavailable and picks another server from the list to request data.

  • The cheapest way to implement load balancing.

     

Hardware Load Balancers 

  • A Hardware Load balancer device (HLD) is used to distribute web traffic across multiple network servers.

  • Hardware load balancers present a virtual server address to the rest of the world. 

  • When customer applications attempt to interface, it will forward the connection towards the most genuine real server doing bi-directional network address translation (NAT).

  •  HLDs can load balance HTTP, and HTTPS traffic or TCP and UDP traffics.

  • The load balancer could handle precisely which server got which association and utilized health monitors" of expanding intricacy to guarantee that the application server was reacting acc to the situation; if not, it would consequently quit sending traffic to that server until it created the ideal reaction (showing that it was working appropriately).