I don’t find any information on the documentation. Is the log feature (to log each request) do a synchronous write (each request = one write on the file) or an asynchronous write?
If asynchronous, how I can control the buffer size or the delay before writing to hdd?
In our production environment, law force us to keep at least 1 year of access log. even with log rotation. log could became a bottleneck in high-traffic website.
@zero-x-baadf00d No, because that doesn’t do anything to help conserve disk space, which is the point of log rotation. But by default, each entry in the log has the timestamp, so you can still get date information from that inline with the data itself.
To save space on the caddy server, we ship all the logs to a central logging facility (in our case, ElasticSearch). Having a year of logs dotted about on various servers sounds like a mess to interrogate.
In our high performance/traffic situation as gateway-proxy, caddy log make top tmpString. I think reduce gc/malloc and async flush maybe better for this high performance/traffic