AltHub

gorilla/mux Alternatives

Go HTTP routing / web server routing

gorilla/mux is a Go HTTP request router and URL matcher that implements net/http.Handler, used for building web servers with conditions like path, host, method, and query matching.

21.8kGoBSD-3-Clausedormant · last push 2.1y agoGitHub

Same job, different approach

Solves the same problem with a different architecture or at a different layer. Expect to rewrite the integration.

gin-gonic/ginGitHub

Full-featured Go web framework with routing, middleware, and rendering; use when you want a batteries-included framework rather than just a router.

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

89.1k
Go
MIT
active1mo ago
labstack/echoGitHub

High-performance Go web framework with routing and middleware; choose when you want a minimalist framework with an API different from mux.

High performance, minimalist Go web framework

32.7k
Go
MIT
active1mo ago

Older generation, or narrower

An earlier or more limited way to do the job. Still the right call when you need something small, proven, or CPU-only.

julienschmidt/httprouterGitHub

Higher raw routing performance with a radix tree and minimal API, but lacks mux's regex/host matching and has had no pushes for over 2 years.

A high performance HTTP request router that scales well

17.1k
Go
BSD-3-Clause
dormant2.2y ago

Listed as an alternative to

These projects were analysed and named mux among their alternatives. The relationship is not symmetric — how mux rates them is a separate judgement, made when mux is analysed in its own right.

gin-gonic/ginGitHub

calls mux “Older, narrower HTTP router for net/http; use when you need a simple, widely-deployed router without framework features.”

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

89.1kGoactive
labstack/echoGitHub

calls mux “a mature but stale router-only library; choose when you just need a powerful URL matcher and want to stay close to net/http, but it has no recent releases.”

High performance, minimalist Go web framework

32.7kGoactive
go-chi/chiGitHub

calls mux “Choose for a mature, feature-rich stdlib-compatible router with route grouping and regex patterns, but note it is largely unmaintained.”

lightweight, idiomatic and composable router for building Go HTTP services

22.7kGoactive
julienschmidt/httprouterGitHub

calls mux “choose when you need complex route matching (regex, domains, schemes) and can accept slower matching and stale maintenance.”

A high performance HTTP request router that scales well

17.1kGodormant