Discussion on Addons (which directives are addons and which ones aren't)

I read most of the docs and I checked which directives are addons and which ones aren’t.

What will follow are suggestions based on my own use-case and meant more as an “open discussion”.

They’re also suggested to help some downsides mentioned in this video:

  • Large binary
  • Would help in packaging a minimal caddy for a personalized use-case
  • May reduce memory footprint a bit

I felt these directives may be a better fit as addons (that may be turned on or off from an install):

  • basicauth (documented as being for legacy sites)
  • expvar (debugging tool that doesn’t seem as a must-have on a production server)
  • markdown
  • pprof (debugging tool that doesn’t seem as a must-have on a production server)
  • templates
  • websocket

I would maybe add these too (if they’re considered out of core features):

  • fastcgi
  • proxy

Are there performance considerations on addons that may make these not a good pick as an addon?

Thanks for opening the discussion, @magikstm!

These are actually really important to include by default because if you have an issue in production and you need an inside look right away, being able to turn these on at any moment is valuable.

No; all standard directives are technically “plugins” too, so all directives have the same performance benefits.

The point of having plugins is so the Caddy code base doesn’t get too bloated; but Caddy started off with most of these directives already in core and they’re pretty mature by now. Proxy is also one of the most-used directives and it definitely needs to remain standard. So does fastcgi. As it is, it would probably be more work to move these out of the Caddy repo and maintain them separately than it would be to just leave them there.

I also don’t think there’s much benefit here in reducing the size of the binary (by a few bytes or maybe a kilobyte or two? I dunno – wouldn’t be much) considering the cost of maintaining these separately.

1 Like

I actually lean the opposite direction. I would rather have more functionality included in the core distribution in order to not need to manually select them.

Makes it easier for people using stock docker images or os packages that way too.

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