On 21/06/16 19:02, Willy Tarreau wrote:
> Your message was properly posted, it's just that not that many people
> have enough experience with Lua yet so it's often hard to respond.

Sure, thanks, that is understood.

> What I can say is that you won't be able to restart a new process, but you
> may possibly find how to use Lua to issue a kill signal to the process
> itself to trigger a soft-stop. Maybe this combined with an external
> monitoring mechanism could work, I don't know. I'd tend to find this
> fragile though :-/

Yes, this is the kind of approach I also contemplated and that could
possibly work as far as reloading goes.

> Coudln't you instead pass the admin request to an agent in charge for
> doing all of this stuff ? It would seem safer and more durable to me.

Indeed this is what is going on right now, the agent mediates all access
to HAProxy and covers all needs. It's just that it is a component that
could be possibly done away with.

You know how it is, one creates an agent but then it needs user
documentation since it requires a TCP socket and there is proper
testing, TLS material rotation required etc. so maintenance costs are
increased, slightly but still.

I have supplementary question.

I'm not familiar with HAProxy internals but I picture that there is a
core process that deals with requests and that this main process has an
API for its own use, i.e. a set of structures and functions that
actually handle requests.

So, when program control is redirected to Lua, does Lua receive a handle
to that main server object? The point being, I could possibly just call
HAProxy's own functions, for instance to return statistics to Lua which
would reformat them into the output format required.

Do you think that would be feasible?

regards,

-- 
Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and Cloud Integrations in Python

Reply via email to