what's your recommended router? chi, mux, something else?

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

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

    A high performance HTTP request router that scales well

  • But, if you care about speed take a look at httprouter. That's the one we're using in our company. It's fast but the biggest downsides for me are:

  • 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

  • Chi for work, my own router for personal projects

  • 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
  • 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.

  • restruct

    RESTruct is a rest router written in Go to automatically create routes based on your structs. (by altlimit)

  • For me it's mux and my personal router restruct but since mux is not maintained anymore, maybe chi will be my goto for new projects that needs more stability in the api. Since restruct is a router based on structs, which I use for fast prototyping.

  • chi

    lightweight, idiomatic and composable router for building Go HTTP services

  • I don't use chi anymore ever since this happened.

  • oapi-codegen

    Generate Go client and server boilerplate from OpenAPI 3 specifications

  • I use oapi-codegen with Echo

  • Echo

    High performance, minimalist Go web framework

  • echo! It's really easy it to use for simple routes but you can as well define routing groups as I did here.

  • 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
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