What mux/router to use now a days?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • flow

    A delightfully tiny but powerful HTTP router for Go web applications (by alexedwards)

  • Flow: https://github.com/alexedwards/flow

  • grrt

    GRRT (Go Request RouTer) is a direct replacement for gorilla/mux. It has built-in CORS, path variables and method based routing.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • otelchi

    OpenTelemetry instrumentation for go-chi/chi

  • https://github.com/riandyrn/otelchi might work for you

  • signoz

    SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool

  • We use https://signoz.io/ easy to setup

  • httprouter

    A high performance HTTP request router that scales well

  • For a simple web app, https://github.com/julienschmidt/httprouter

  • gorilla-mux

    A fork of gorilla/mux, the powerful HTTP router and URL matcher for building Go web servers with 🦍

  • gorilla/mux is at least more battle-tested. I'd rather fork it myself, or evaluate a useful fork of it such as this one (if it seems well-maintained, I haven't done the leg-work).

  • useful-forks.github.io

    Improving GitHub's Forks list discoverability through automatic filtering. The project offers an online tool and a Chrome extension.

  • gorilla/mux is at least more battle-tested. I'd rather fork it myself, or evaluate a useful fork of it such as this one (if it seems well-maintained, I haven't done the leg-work).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • waggy

    The dead simple, easy-to-use library for writing HTTP handlers and routers in Go that can be used in standard HTTP server environments or in WAGI (Web Assembly Gateway Interface) environments

  • For work, we’ve switched to Chi. For personal projects, I use a router I’ve been built and have been working on myself

  • Fiber

    ⚡️ Express inspired web framework written in Go

  • I'm still using gorilla for projects that started off with gorilla, but for newer projects I've been moving towards fiber and I actually quite like it

  • rootdown

    The internet demanded another Go router

  • There’s only one router named after a Beastie Boys song, so it’s pretty obvious which one to use. https://github.com/carlmjohnson/rootdown

  • jwtauth

    JWT authentication middleware for Go HTTP services

  • It's difficult to assess their security response because it doesn't seem that they've had any CVEs. A different project by the go-chi maintainers, jwtauth, did have to address moving away from a vulnerable dependency, which took them almost 3 months to fix. So, not ideal - but jwtauth isn't as active or used anywhere near as much as chi itself, so doesn't necessarily reflect their responsiveness to a chi vulnerability.

  • Gin

    Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

  • I found this article about someone who evaluated Gorilla Mux replacements and chose Chi, which may be helpful. FWIW I did some of my own investigation and I'm leaning towards Gin, since it's more performant which is a factor for my current usecase.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts