Re:Caddy is the first and only web server to use HTTPS autom...
by yakubin on Tuesday September 12, 2023 @04:48AM
(#37478333)
I like Caddy, mainly for the ease of configuration. One thing that surprised me though: by default it has compression disabled. I discovered it 1 year after moving from nginx (with the nginx config having compression enabled) and it was funny, because at the time of migration I got comparable performance out of the two. Obviously, after enabling compression, it’s faster now.
[ Parent
| on HN ]
Re:Caddy is the first and only web server to use HTTPS autom...
by mholt on Tuesday September 12, 2023 @10:04AM
(#37481464)
We don't enable compression by default because we leave it up to the site owner to decide whether to optimize for network efficiency or CPU efficiency. (Also, disabling implicit things is more tedious and confusing than enabling things.)
Glad to hear you use Caddy! :)
Re:Caddy is the first and only web server to use HTTPS autom...
by francislavoie on Tuesday September 12, 2023 @12:21PM
(#37483624)
To add onto mholt's reply, we avoid implicitly enabled functionality where possible (the only feature that's implicitly enabled generally is Automatic HTTPS, off the top of my head). By default, Caddy's HTTP handlers do nothing which is good because it gives you a clean slate to build on top of. If you had to turn off features to reset back to zero, that's cruft. For example, think of CSS resets, which are needed to turn off styles added by browsers by default; that's annoying and a complication that all websites need to deal with to get consistent behaviour.
Re:Caddy is the first and only web server to use HTTPS autom...
by kasdi on Tuesday September 12, 2023 @03:17PM
(#37486413)
Great approach. User agent default style sheets are the worst, especially since they are all different.
But, instead of handing the user a empty slate with nothing, it should contain a note saying “look, these are the recommended options”. If the initial config is interactive, it could even prompt to activate them: “want to use compression?” - “yes”, etc.
Re:Caddy is the first and only web server to use HTTPS autom...
by francislavoie on Tuesday September 12, 2023 @03:20PM
(#37486459)
Those recommendations are in the documentation.
Interactive configuration is easier said than done. We don't realistically have the time to build and maintain that on top of the core program and config. We're already stretched pretty thin.