Skip to content

cjrh/aiohealthcheck

Repository files navigation

image

image

image

image

image

image

image

aiohealthcheck

This tiny module provides a simple TCP endpoint, suitable for a healthcheck in your microservice application. All it provides is a simple TCP endpoint on a port to allow a container orchestration service to connect to, to verify that the application is up.

Demo

Pretty much just start up a long-lived task with the provided tcp_health_endpoint() coroutine function:

loop.create_task(aiohealthcheck.tcp_health_endpoint(port=5000))

The internal TCP server will be shut down when the task is cancelled, e.g., during your app's shutdown sequence.

Kubernetes Example Configuration

ports:
- name: liveness-port
  containerPort: 5000
livenessProbe:
  tcpSocket:
    port: liveness-port
  initialDelaySeconds: 15
  periodSeconds: 20

About

Very simple TCP-based health check service.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published