Rack::Health is a health check interface for rack applications.
# Gemfile
gem 'rack-health'
# config.ru
use Rack::Health
$ curl localhost:3000/rack_health
=> 200 OK
use Rack::Health, :path => '/healthcheck'
$ curl localhost:3000/healthcheck
=> 200 OK
use Rack::Health, :sick_if => lambda { File.exist?('/tmp/service_out') }
$ curl localhost:3000/rack_health
=> 200 OK
$ touch /tmp/service_out
$ curl localhost:3000/rack_health
=> 503 Service Unavailable
Rack::Health is released under the MIT license:
Copyright (c) 2012 Issei Naruta