Hello, On Wed, 26 May 2021 at 13:29, reshma r <[email protected]> wrote: > > Hello all, > Periodically I need to write some configuration data to a file. > However I came across documentation that warned against writing to a file at > runtime. > Can someone give me advice on how I can achieve this safely?
You'll have to elaborate what you are talking about. Are you talking about writing to the filesystem from a LUA scripts or other runtime code within haproxy? Then yes, don't do it, it will block the event loop and you will be in a world of hurt. Are you talking about writing and changing the configuration file, prior to a reload, manually or from a external process, that's not a problem at all. The issue is blocking filesystem access in the event-loop of the haproxy process itself. Explaining what the problem is you are trying to solve can get you more accurate proposals and solutions faster than asking about a particular solution (XY problem). Lukas

