Plack::Middleware::ServerStatus::Tiny - tiny middleware for providing server status information
version 0.002
use Plack::Builder;
builder {
enable 'ServerStatus::Tiny', path => '/status';
$app;
};
$ curl http://server:port/status
uptime: 120; access count: 10
This middleware is extremely lightweight: faster and smaller than Plack::Middleware::ServerStatus::Lite. While that middleware is useful for showing the status of all workers, their pids and their last requests, it can be a bit heavy for frequent pinging (for example by a load balancer to confirm that the server is still up).
This middleware does not interrogate the system about running processes, and does not use the disk, keeping all its data in memory in the worker process. All it returns is the number of seconds since the last server restart, and how many requests this particular process has serviced.
-
path
The path which returns the server status.
Bugs may be submitted through the RT bug tracker
(or bug-Plack-Middleware-ServerStatus-Tiny@rt.cpan.org).
I am also usually active on irc, as 'ether' at irc.perl.org
.
Karen Etheridge ether@cpan.org
This software is copyright (c) 2013 by Karen Etheridge.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.