Is there a config flag that can be set in the conf file that will tell stunnel to listen on the https accept port only when the connect port is up and listening? The issue i am trying to address is when a load balancer talks to a server, I need to make sure the port that stunnel redirects to is healthy. Right now the load balancer will send traffic to the port all the time regardless of the health of the port that stunnel redirects the traffic to.
On Thu, Dec 23, 2021 at 01:26:26PM -0000, roartysa@gmail.com wrote:
Is there a config flag that can be set in the conf file that will tell stunnel to listen on the https accept port only when the connect port is up and listening? The issue i am trying to address is when a load balancer talks to a server, I need to make sure the port that stunnel redirects to is healthy. Right now the load balancer will send traffic to the port all the time regardless of the health of the port that stunnel redirects the traffic to.
Hi,
To start with, here's a disclaimer: please note that I am in no way affiliated with the authors of stunnel.
The last time this question came up, there was a question right back at the poster: how can stunnel know whether the service that it is configured to connect to is actually operational? There is no way for stunnel to know whether something is listening on some port at some host without actually connecting to it and seeing whether the attept to connect succeeded.
For the somewhat logical follow-up question "okay, so why can stunnel not periodically try to connect to the service, disconnect immediately if it succeeds, and stop listening if it fails", see my answer at
https://www.stunnel.org/mailman3/hyperkitty/list/stunnel-users@stunnel.org/t...
(search for "three points here" to find my answer)
Hope this helps!
G'luck, Peter