https://github.com/inscapist/simple-ping
Simply returns HTTP 200. Meant to be used together with NodePort service, as node health check
https://github.com/inscapist/simple-ping
haskell health-check healthcheck kubernetes nix nix-shell nixpkgs
Last synced: 3 months ago
JSON representation
Simply returns HTTP 200. Meant to be used together with NodePort service, as node health check
- Host: GitHub
- URL: https://github.com/inscapist/simple-ping
- Owner: inscapist
- License: mit
- Created: 2021-04-22T05:34:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T05:37:41.000Z (over 4 years ago)
- Last Synced: 2025-04-07T13:11:29.041Z (6 months ago)
- Topics: haskell, health-check, healthcheck, kubernetes, nix, nix-shell, nixpkgs
- Language: Nix
- Homepage:
- Size: 105 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Ping
All this project does is to serve an API that returns 200 status to the caller.
This is useful to be used when paired with NodePort service, so that load balancer can determine healthy nodes to route to.
## Getting started
You need nix. And if you have direnv (i am using Doom emacs) and lorri, you don't need to do anything else. This is your "virtualenv" with batteries included. Haskell language server, hlint, stylish-haskell, etc.
```sh
# requirements
nix-env -iA nixpkgs.lorri
nix-env -iA nixpkgs.direnv
```- Refer this [Makefile](./Makefile) for command usage
- Refer [k8s](./k8s) on how to deploy this on kubernetes
## Docker
https://hub.docker.com/r/sagittaros/simple-ping
```sh
docker run -p 3000:3000 simple-ping
```## FAQs
#### Why not just let load balancer calls /healthz of the web app?
Well, imagine that you are running private cluster (mongodb, redis) that is not meant to serve web requests. Yet you need the health ping capability in order to use Health Checks for Auto Scaling instances.
https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html

#### Is this project an overkill?
Certainly, I am learning Nix.