Thanks for pointing out the obvious flaw Maciej.

Is it possible to modify option #2 (Lua-script powered endpoint) to define
a read-write endpoint where read endpoint (HTTP GET) returns the health
status while the write endpoint (HTTP POST on the same port) will update an
in-memory variable that represents the health status?  We will ensure that
the source IP and port of the caller are valid for security purpose.
Subsequent read responses will change based on the updated value of this
in-memory variable.

Any idea option #2 or option #3 is better or if there are better options
out there?

Thanks!

On Mon, May 22, 2017 at 10:21 AM, Maciej Katafiasz <
mkatafi...@purestorage.com> wrote:

> On 22 May 2017 at 00:23, Gold Star <catchgolds...@gmail.com> wrote:
> > We can assume that the decider process sets an environment variable, say
> > HEALTHY, to true or false at any time it wants. We would like an haproxy
> > instance to return a healthy signal iff it is genuinely healthy and the
> > HEALTHY environment variable is set to true.
>
> This can't possibly work, because the POSIX environment is only
> inherited by the process on start, and static afterwards. There's no
> way to update another process's environment.
>
> Cheers,
> Maciej
>

Reply via email to