Sign inSign up

harbur/rolling-dice-nginx

By harbur

Updated about 10 years ago

Rolling Dice Nginx - An example of health checks

Image
0

955

harbur/rolling-dice-nginx repository overview

Rolling Dice Nginx

Rolling Dice Nginx - An example of health check use

The rules are the following:

  • Every time the application starts it rolls a 20-sided dice.
  • If the number is 8 or above, the application wins the goblin and starts the nginx.
  • If the number is 7 or below, the application misses the hit, the goblin counter-attacks and nginx is never launched.

Why?

The RDN is used in order to help better understand how health checks works. It simulates an application that may or may-not fail during startup. In order to avoid having the container exit-on-failure, the startup is wrongly designed to launch nginx on the background and tail the access logs. If the nginx is launched correctly it is exposed on port 80 and outputs the hostname and the dice number on a GET / request.

Versions

  • The version v1 is released without health-check.
  • The version v2 is the new and improved version that contains health-check metadata.

Tag summary

Content type

Image

Digest

Size

16.3 MB

Last updated

about 10 years ago

docker pull harbur/rolling-dice-nginx