You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 -
The amount of time taken for execution of one submission is 5 seconds.
Out of all the pending jobs, each node gets a maximum of 5 submissions to execute.
Hence the maximum waiting time for each submission is 25 seconds.
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.
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.
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
The text was updated successfully, but these errors were encountered:
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.
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.
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.
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 -
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.
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
The text was updated successfully, but these errors were encountered: