DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: Goodbye Nginx, hello Caddy

devimposter1 profile image
devimposter

Uh, it was supposed to be a joke about worrying about every single performance optimization for a web site that may have very little need. People still use Wordpress and other "fat" CMS's etc. without a problem...

Thread Thread
siy profile image
Sergiy Yevtushenko

Well, we're draining planet resources without a problem as well. And affecting climate without a problem too. Does that mean that we should not worry about these issues at all, if they don't cause any problems to us?

Thread Thread
destynova profile image
OisΓ­n

You're totally right that we should consider the efficiency (and therefore energy + cost) aspect. But it can't be the only thing we consider. If two options are equal in all respects except efficiency, there can be no question that we would choose the less efficient option.
However, if for example configuration is simpler, and managing SSL certs is very important, then it might make sense for someone to choose a less efficient option that has those other advantages. I'm sure you've run into configuration problems that wasted hours of your time -- that could be enough to cancel out the cost savings of the more efficient option.

Thread Thread
siy profile image
Sergiy Yevtushenko

Completely agree. I just answered on an attempt to downplay importance of efficiency.

Thread Thread
iainjreid profile image
Iain J. Reid

Funnily enough Caddy handles medium load more efficiently than NGINX, with much lower times to first byte on average, and with much less CPU consumption. Matt (the project author) made the same findings and dropped them in a thread on the Caddy forums.

Performance is not the only factor to take into account though when building good software, and whilst C or the likes will outperform many languages when counting the Fibonacci sequence, it can't compete with the Go ecosystem when it comes to networking tools. Hell, Netflix uses Go for a huge part of its networking stack, and they boast one of the largest, most complex setups to date.

I'm all for questioning new or "hype" projects, but it's unfair to describe Caddy as such. NGINX is very dated, and whilst it performs fantastically in specific use cases, it's good to have a new alternative that's more forgiving in the many new challenges we face today.

Thread Thread
siy profile image
Sergiy Yevtushenko

Well, taking into account that vast majority of networking code across all operating systems is written in C or C++, Go ecosystem is more or less usable at best. And I know what I'm talking about because at one of my previous jobs I was writing networking tools in Go.

Thread Thread
freedom profile image
Freedom • Edited on

@sergiy Yevtushenko
I came across your comment recently, on the other hand, comparing static HTML/dynamic content seem it's a good replacement for PHP-FPM+Nginx with just Go that gave more than 3x performance on a VPS with 1vCPU. At least, that the next logical step to consider since you are probably aware majority of websites on shared hosting are running PHP. Overpaying for lower performance efficiency is bad.

Some comments have been hidden by the post's author - find out more