wollomatic / socket-proxy

A secure-by-design and flexible unix socket proxy. No external dependencies. Needs no shell or interpreter in a container. Written in Go (memory safe). Can replace tecnativa/docker-socket-proxy or linuxserver/docker-socket-proxy. Most flexible configuration with regular expressions
https://hub.docker.com/r/wollomatic/socket-proxy
MIT License
66 stars 2 forks source link

healthcheck vs watchdog #21

Open alexxoid opened 2 months ago

alexxoid commented 2 months ago

Hello!

With only option "-watchdoginterval=120" set I got "msg="checking socket availability" origin=checkSocketAvailability" every 2m in logs. But with added options "-allowhealthcheck" and "interval: 10s" I see the same msg every 10s.

Is healthcheck have the same functionality as watchdog? Or is it's just the same msg text.

Think there should be the more description in Readme.

wollomatic commented 2 months ago

Hello, thanks for reaching out.

Short answer: While the health check ist the health check done with Docker or the container orchestrator, the watchdog ist an internal function to check the socket connectivity (and quit if the connection is dead, so that Docker can restart socket-proxy with a new socket connection).

Personally, I prefer to use the internal watchdog in my use case. The health check is for use cases when a container health status is needed. Errors have to be handled from Docker or the orchestrator then.

Both health check and watchdog are using the same internal function to test the socket availability, so the log entries are the same.

I'll add this to the Readme later.