Coder Social home page Coder Social logo

nd6688 / server-load-balancing Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 144 KB

Problem Definition: Load balancing across servers can be done, but without generally agreed upon principles on how to best accomplish this, it would not be possible to achieve best results. Different techniques are available which balance the load on servers based on the requirements of the application. Different techniques such as Round Robin, Least Connection, Random, etc do not give best results for application where heavy computation power is required.

server-load-balancing's Introduction

Server-Load-Balancing

Problem Definition: Load balancing across servers can be done, but without generally agreed upon principles on how to best accomplish this, it would not be possible to achieve best results. Different techniques are available which balance the load on servers based on the requirements of the application. Different techniques such as Round Robin, Least Connection, Random, etc do not give best results for application where heavy computation power is required.

Solution Design: Our solution is to balance the load on servers using the information about recent CPU usage of all the available servers with the load balancer. Whenever a load balancer receives request from a client, all the servers are queried for their current system load average for the last minute. We select the server which is least loaded and forward the request to it. Server serves the request and sends result to the client. If client's data on the server is manipulated or new data is added, server acknowledges data replicator about the change. This change in data is notified to all the servers by data replicator.

Implementation steps:

  1. Compile all the java files
  2. Run PrimaryLB on first server
  3. Run SecondaryLB on second server
  4. Run Replicator on third server
  5. Run any number of Server file on any server except the above three
  6. Run client on any server and test the code

server-load-balancing's People

Contributors

nd6688 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.