Hi all,
I’ve seen quite a few Golang web frameworks out there – namely Iris, Gin, Echo, and Revel. I don’t fully understand what they do above and beyond something like Caddy, but many of them stress their performance (more than one claims to be the fastest Golang web framework). Key for some of them is the performance of their request router, or what the Golang docs call a “request multiplexer” (ServeMux).
I think at least a couple of them use Julien Schmidt’s HttpRouter, which looks to be much faster than the default ServeMux from the Go http package and Gorilla Mux too.
How hard or easy would it be swap HttpRouter into Caddy as a replacement for ServeMux? I’m just learning about these routers, but the performance difference looks enormous to me.
FYI, here’s an interesting article expressing frustration with all Go URL routers, and his follow-up introducing his solution.