Skip to content

harbur/rolling-dice-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rolling Dice Nginx - An example of health check use

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages