Giter VIP home page Giter VIP logo

java-autoscaler's Introduction

Java Autoscaler

Simple Restfull Cloud Foundry Appplication Autoscaler written in Spring/Java

Prerequisites

  1. Cloud Foundry installation
  2. An AMQP service installed named rabbit (This can be changed by altering the manifest.yml under services)
  3. A queue enabled on the AMPQ service

Usage

  1. Download/clone the project
  2. Edit the src/main/resources/application.properties file to match your Cloud Foundry and queue information
  3. Run the maven wrapper $ ./mvn clean package
  4. Push the applicaiton to Cloud Foundry $ cf push

Once the application is running on Cloud Foundry it will issue scale commands for the application defined in the application.properties file based on the current size of the queue that is defined in the properites file. There are three restfull requests to use the autoscaler.

  • AUTOSCALER_HOSTNAME.CF_APP_DOMAIN/scaleup

    The autoscaler will check the depth of the queue. If that is larger than the current number of instances of the monitored application, it will scale up by the value defined in application.properties under cf.scale.

  • AUTOSCALER_HOSTNAME.CF_APP_DOMAIN/scaledown

    The autoscaler will scaled the monitored application down to the default value defined in the applicaiton.properties file under cf.scalemin

  • AUTOSCALER_HOSTNAME.CF_APP_DOMAIN/stop

    The autoscaler will issue a stop command to the monitored application, shutting down all running instances. This will not scale the application down. If resumed, the application will maintain it's previous number of instances.

java-autoscaler's People

Contributors

vrusso-kong avatar

Watchers

James Cloos 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.