On Mon, 8 Feb 2016 21:20:25 +0100 Beluc <[email protected]> wrote: > Hi, > Thank you for answering ! > > Le 8 févr. 2016 9:05 PM, "Thierry FOURNIER" <[email protected]> > a écrit : > > > > On Mon, 8 Feb 2016 18:36:38 +0100 > > Beluc <[email protected]> wrote: > > > > > Hi, > > > > > > I have few questions about that : > > > > > > is that annoying to do fs i/o in a core.register_task ? I read that > > > everywhere else, it's not recommended but here, I'm not sure ... > > > > > > Hello, > > > > I confirm: it is not recommended also in tasks. The tasks executions > > are scheduled between the I/O access, so we cannot not block the > > process. > > What about SQLite access ? Acceptable or better do it with redis for > example ?
Redis is better beacause it is acceded via a networks connexion. You can use an SQLite if: - the storage of the database is on ramdisk (/dev/shm) - the SQLite access are not bloking. > > > > > > > second question, I cannot find out how to retrieve backends and > > > servers status (UP or DOWN) in core.register_task. is that possible ? > > > any idea ? > > > > > > Its not possible for the moment. I hope to find any time to do this in > > the next HAProxy version. > > Great ! > I managed to access haproxy socket using core.tcp for now. Is that > acceptable too or better do this using http stats socket ? Yes, you can look here: http://www.arpalert.org/haproxy-scripts.html The stats aggregation script retireve the socket info, parse it and return the list of backend/frontend/server. Thierry

