aklivity / zilla

🦎 A multi-protocol edge & service proxy. Seamlessly interface web apps, IoT clients, & microservices to Apache Kafka® via declaratively defined, stateless APIs.
https://docs.aklivity.io/zilla
Other
543 stars 50 forks source link

Add Health checks #985

Open vordimous opened 6 months ago

vordimous commented 6 months ago

Describe the desired outcome from the user's perspective As a DevOps maintainer optimizing Zilla deployments, I would expect Zilla to expose the status of its internal connections and services. If Zilla can determine if a downstream service is unreachable or degraded, It could provide an API to report the status. Any internal systems that can be in a Green, Yellow, or Red state would be helpful in reporting that status to an orchestration layer.

Acceptance criteria

Additional context

vordimous commented 2 months ago

As a workaround until this feature is completed here is an example docker and bash health check for an active port. It is a convenient way to verify local service port listening status for docker health check just using bash.

In docker compose:

    healthcheck:
      interval: 5s
      timeout: 3s
      retries: 5
      test: ["CMD", "bash", "-c", "echo -n '' > /dev/tcp/127.0.0.1/1883"]

in terminal:

% bash -c "echo -n '' > /dev/tcp/localhost/8021"
bash: connect: Connection refused
% bash -c "echo -n '' > /dev/tcp/localhost/8022"
bash: /dev/tcp/localhost/8022: Connection refused