Longer ramcache TTFB than expected

Hi

I am serving static HTML from ramcache, with a “hello world” file the TTFB is ~8.5ms, however as the size of file increases to ~40KB, the TTFB increases to ~12.5ms, is this expected behaviour, considering the files are from RAM?

I would also be interested in knowing whether it is possible to serve precompressed data, specifically brotli encoded files (I have read on this forum that gzip is faster at compression, so I am not asking for OTF brotli compression). I assume this could be done with a conditional rewrite and setting the content-encoding header accordingly, is this possible? (I am sorry if this is a trivial question, I’m a new user of Caddy and have been finding my way around the documentation areas)

At the moment I am finding that TTFB for small files is ~1ms less than similar files served by Nginx, but obviously the binaries are different, slightly different ciphers and certs, but I am interested in seeing what performance I can squeeze out of this shiny new Caddy Server :slight_smile:

Thank you!

Hi @TBA, that ramcache question is an interesting one.

As for serving brotli files, have you tried putting an index.html.br next to the existing index.html? I believe Caddy should be serving that if applicable.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.