Quietus
Simple status check web server.
Why
You might want to use this to provide a status check to an AWS ELB where you don't have a web server in your app. Having a status check lets you quietly kill unhealthy instances and replace them.
See these AWS Docs.
Usage
require 'quietus'
optional_hostname = 'localhost'
optional_port = '2347'
# quietus runs your check in a loop, so you might want to sleep
def your_status_check
sleep 1
is_my_app_healthy?
end
# quietus is blocking so you might want to run it in a thread or fork depending on your Ruby version
t = Thread.new do
Quietus::Server.new(optional_hostname, optional_port) { your_status_check }
end
The Quietus server will return a 200 if your_status_check is truthy, 500 otherwise
By default quietus runs on port 2347.