Idle Whacker
What the?
Idle whacker polls a given url periodically so that the app server never goes to sleep.
How the?
Idle whacker installs a crontab entry on a given (host) machine which then uses ab
(apache-bench) to generate traffic to a given URL periodically.
Installation
Idle whacker depends on ab
being available on the command line. ab
(apache-bench) can be installed via apt-get install apache2-utils
- this is a really small util, with libreadline at its only dependency. After the gem install, you may need to run rbenv rehash
based on your environment.
Usage
> idle_whacker [command]
Available commands:
install: Installs a whack
remove : Removes all installed whacks
show : Show installed whacks
test : Test a whack
A sample session of installing a whack
> idle_whacker install
URL to whack, eg(http://www.foobar-server.com/lazy_boy.html): http://www.nest.com/about/ #URL to poll for.
Whacker install host eg(www.foobar-server.com): www.whacker.com #Machine where the crontab will be installed
Username: deployer #Login to the above install host
Password (Leave this blank if ssh keys are setup):
Installing crontab entry..
*/5 * * * * echo '[idle_whacking]' && ab -c 5 -n 25 http://www.nest.com/about/
Done.