Skip to main content

aiohealthcheck: super-simple TCP health-check endpoint

Project description

https://travis-ci.org/cjrh/aiohealthcheck.svg?branch=master https://coveralls.io/repos/github/cjrh/aiohealthcheck/badge.svg?branch=master https://img.shields.io/pypi/pyversions/aiohealthcheck.svg https://img.shields.io/github/tag/cjrh/aiohealthcheck.svg https://img.shields.io/badge/install-pip%20install%20aiohealthcheck-ff69b4.svg https://img.shields.io/pypi/v/aiohealthcheck.svg https://img.shields.io/badge/calver-YYYY.MM.MINOR-22bfda.svg

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiohealthcheck-2018.3.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiohealthcheck-2018.3.1-py2.py3-none-any.whl (15.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aiohealthcheck-2018.3.1.tar.gz.

File metadata

File hashes

Hashes for aiohealthcheck-2018.3.1.tar.gz
Algorithm Hash digest
SHA256 3a6c5889738f3f03ccf8124cca5c9372a423d3c0c25fc9ec9e5250455c212952
MD5 2c9cd562646e63d677e419af9c54222f
BLAKE2b-256 6b665084caa444c59c53ecb6bc33e04fbf1d2bd4cc6780ae6c96e3a697ced979

See more details on using hashes here.

File details

Details for the file aiohealthcheck-2018.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for aiohealthcheck-2018.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e458ca4fefa6752e225d6f06de29fe7dcf379347ded3aa43c803c00ea3c9bfa0
MD5 601387c63533fe1ea607f597fface821
BLAKE2b-256 569b5069189c846b2e9c663795c9fb5a635d93d7e2aa1ea8d8745b5311437acd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page