Skip to content

An auto-scaling alternative to elastic load balancer in EC2 for web applications using HAProxy

License

Notifications You must be signed in to change notification settings

nithin-bose/ec2-auto-scaler

Repository files navigation

Requirements

You need to have HAProxy installed.

  • Ubuntu

      $ sudo apt-get install haproxy
    

Installation

$ git clone [email protected]:nithinbose87/ec2-auto-scaler.git && cd ec2-auto-scaler
$ python setup.py install

Configuration

By default ec2-auto-scaler uses the example/config.ini file or use --config option to specify the config file.

Usage

ec2-auto-scaler is designed to run as a daemon from the load balancer itself.

To start daemon:

$ python ec2-auto-scaler.py start

To stop daemon:

$ python ec2-auto-scaler.py stop

To restart daemon:

$ python ec2-auto-scaler.py restart

To know the status:

$ python ec2-auto-scaler.py status

scaling_interval in the main section of the config file can be used to set the freequency of scaling checks.

For example, to run every 5 minutes, set scaling_interval as follows:

[main]
scaling_interval: 300

About

An auto-scaling alternative to elastic load balancer in EC2 for web applications using HAProxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages