Simple Node.js app NOT responding to any TCP request (except for the HTTP maintenance endpoints).
This application is used as a system test helper for circuit breaker scenarios in real environments. Although it is meant as an HTTP application, unresponsitivity can as well be tested with any TCP-based protocol (requires Node v6 or higher).
Run docker with
docker run -p 8080:8095 docker.pkg.github.com/jforge/docker-nodejs-unresponsive-app/unresponsive-webapp:v-1572443441
The projects matches requirements for a Docker Hub Automated Build, e.g. https://hub.docker.com/r/eolio/docker-nodejs-unresponsive-app/
A corresponding Docker image can be used e.g. for a AWS EC2 Container deployment to get a public available "unresponsive" application very quickly, e.g. http://ec2-35-156-94-40.eu-central-1.compute.amazonaws.com/manage/health
Default behaviour is "unresponsive". The server then never responds except for the health checks and responsive switch.
HTTP-GET for the switch is just used for fast testing convenience and does not follow any REST-oriented approach (sorry).
HTTP-Method | Uri | Response | Description |
---|---|---|---|
GET |
/manage/health |
200 |
Returns health and responsivity status |
GET |
/api/health |
200 |
Returns health and responsivity status |
GET |
/manage/set_responsive |
200 |
Sets the behaviour to "responsive" |
GET |
/manage/set_unresponsive |
200 |
Sets the behaviour to "unresponsive" |
GET, POST |
/any/other/uri |
none (timeout) |
Server does not answer with (default) mode "unresponsive" |
GET, POST |
/any/other/uri |
200 |
Server returns always with 200 with mode "responsive" |
"Unresponsive" := the server doesn’t answer at all, if using arbitrary uris except these /api/health and the /manage methods.
The above mentioned /manage methods answer with OK-health and the current (global) responsivity setting.
{
"status": "OK",
"responsivity": "unresponsive"
}