Routing and parsing path parameters

Hi there :slight_smile:

Does Caddy support routing and parsing path parameters?

Since when, you can add it to this quite popular benchmark:

Hi @Matthias_Schuster, welcome to the Caddy community.

Caddy itself isn’t a web framework, per se - it’s a fully-fledged web server, and its peers are Apache and nginx rather than httprouter and Gorilla mux.

It does see frequent use in both TLS-terminating and plain-HTTP load balancer roles, typically based on hostname, and it can operate on the path as well. It doesn’t use the kind of granular path routing that you’d expect from popular Go request routers, though; you’re limited to simple substring matching and regex.

That said, we’re always interested in real benchmarks!

You might be, but I’m not. :wink: General-purpose servers are notoriously difficult to benchmark, and there are few experts with the skills to do them correctly (I’m not one of them). Even more difficult is performing benchmarks that generalize and are worth publishing. I do my own benchmarks to keep basic tabs on Caddy’s performance, and if people ask, I can tell them that Caddy is fast. But they should do their own benchmarks if they know what they are doing, and realize that those benchmarks really only apply to their situation.

Benchmarking web frameworks (and web servers, for that matter) in 2018 seems a little bit like a waste of time – especially those written in Go, almost all of which are just simply fast – unless you’re micro-optimizing a specific use case, or unless you’re, like, Cloudflare, and need 50-100k req/sec. Most people think they need that kind of throughput, but very few do, and even fewer know how to tune their systems (not their web server – as the kernel is usually the bottleneck) correctly to get it.

Just my $0.02.

1 Like