Hi, I’d like to ask how Caddy technically does syscalls (on Linux) and consequently about its behaviour on higher-latency systems, like network-mounted NFS or CephFS.
However, they also point out that Nginx cannot currently do it for open(), which is a pain point. Cloudflare submitted an Nginx patch for that to be done in threads as well, but it was never merged upstream (last email here).
How does Caddy fare here? How is file system access implemented?
I’m not able to speak to the finer points of optimization here but I might be able to point you in the right direction to inspect how it’s handled yourself.
In the static file server module, Caddy relies pretty heavily on the Go standard library.
Files are opened in this code:
Later, after some manipulation they are served to the client as appropriate: