Recently, I have found myself writing more middlewares to handle responses that need to live outside of the main Rails application. The API that Rack provides works well for something trivial, maybe where you want to allow a load balancer to query the application's status: class HealthCheck class Middleware def initialize(application) @application = application end def call(environment) if environ