Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor load balancer #35

Closed
prasadtalasila opened this issue Sep 27, 2016 · 2 comments
Closed

Refactor load balancer #35

prasadtalasila opened this issue Sep 27, 2016 · 2 comments

Comments

@prasadtalasila
Copy link
Member

The load balancer can be broken down into 2 conponents(LB1 and LB2) . One would handle communications with the main server, mysql and execution nodes.
The second would schedule the process and dynamically change the number of execution nodes.

Assumptions when devising a mechanism for addition/removal of nodes -

  1. The amount of time taken for execution of one submission is 5 seconds.
  2. Out of all the pending jobs, each node gets a maximum of 5 submissions to execute.
  3. Hence the maximum waiting time for each submission is 25 seconds.
  4. The second component of the load balancer will have an array of unused ports from 8081 to 8181 from which the new nodes will be attached, one node_queue, array with all the available nodes and job_queue, array with all the pending jobs.
  5. When LB1 recieves from the main server, forwards the request to LB2 -
    if node is available :
    send the job with the scheduled node to LB1
    else if number_of_jobs >= number_of_nodes*5 :
    create a new node, send the job with the new node to LB1
    else :
    wait for a node to complete execution.
  6. When LB1 recieves a submission from one of the nodes, it forwards the score to the main server, and ammends the databse. The node details are sent to LB2 -
    if number_of_nodes*5 >= number_of_jobs :
    remove node
    else :
    if job is pending :
    send the job with the node_details to LB1 for execution
    else :
    add node to queue
@prasadtalasila
Copy link
Member Author

The above ideas from @tejas-sangol seem worth pursuing. But, I would prefer to be done with the two priority tasks before taking this up.

  1. Conversion to test-driven development with implementation of unit testing (using jasmine/mocha/jibe), integration testing (again using jasmine/mocha/jibe), functional testing (using chai/selenium), load testing.
  2. Refactoring of the existing code base to support for new languages. Perform code review, implement continuous integration and delivery (grunt/gulp along with travis/jenkins) and admin panel.

@prasadtalasila
Copy link
Member Author

information taken to feature request page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant