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 - Access the most powerful time series database as a service
  • SonarLint - Clean code begins in your IDE with SonarLint
  • 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

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • otelchi

    OpenTelemetry instrumentation for go-chi/chi

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

  • signoz

    SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, 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).

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • 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