Git Product home page Git Product logo

autoscale-challenge's Introduction

AutoScaling Platform

The auto-scaling platform enables better auto scaling between the three type of jobs i.e priority, misc, and higher.

Dependencies

  • Ruby 2.7.3
  • Rails 6.1.4.1
  • sqlite3
  • sidekiq 6.2.2

To setup project

  • Install deps using bundle install
  • Copy config/application.example.yml to config/application.yml after running bundle exec figaro install
  • Setup DB using rails db:setup
  • Run bundle exec sidekiq at project root and go to rake tasks and saw rake files

Lint

  • rubocop

Assumptions/considerations

  • Currently there is 10 threads for single worker instance
    • Three types of jobs priority, misc and heavy
    • Autoscalar run to manage the priority jobs if it is found in a queue and it will create new worker instance.

Answers to additional questions

If no priority job exists then our autoscalar task run to verify and remove the extra obsolete running worker instances.

Example Considerations:

  • If all 10 threads in a worker are busy executing jobs 1.e 3 priority jobs, 3 misc jobs, 4 heavy jobs.
  • If new jobs are enqueued within 5 minutes, auto-scalar will initiate a new worker.
  • We have a rake task that terminates idle instances.

Example tasks

Task to create the jobs

  • rake autoscale:create_and_enqueue_jobs

Task to perform the autoscaling

  • rake autoscale:scale_servers

Task to terminate the idle worker instances

  • rake autoscale:terminate_idle_instances

autoscale-challenge's People

Contributors

usmanasif4 avatar

Watchers

Sanghoon Jun 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.