Fiber v3: Express-style routing on Fasthttp, with a zero-allocation catch
Project brief: Express inspired web framework written in Go. Fiber is an Express inspired web framework built on top of Fasthttp , the fastest HTTP engine for Go .
At a glance
- What is it?
- Fiber brings Express-style handlers to Go, built on Fasthttp for speed. The v3 line requires Go 1.26 or higher and context reuse is a hard rule, which is the real trade-off to weigh.
- Who is it for?
- Adopt Fiber if you want an Express-like API in Go with Fasthttp's performance profile and you can live with the zero-allocation rule: never keep references to context values beyond a handler. Do not adopt it if you are on a Go version below 1.26, if you require the full net/http middleware ecosystem, or if you cannot train your team to avoid storing c.Values.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.
Star history
- gofiber/fiber40,277 ★ · +249
| Repository | 2026-07-31 | 2026-11-13 |
|---|---|---|
| gofiber/fiber | 40k | 40.3k |
249 Stars in the last 105 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Fiber actually is and who it serves
Fiber is a web framework for Go that borrows its handler signature and routing style from Express.js. The README states that it is built on Fasthttp, the HTTP engine from valyala, and that it aims for zero memory allocation and high performance. The target user is explicit: new gophers coming from Node.js who want a familiar API while moving to Go. If you have written Express routes, Fiber's app.Get with a handler taking a context and returning an error will feel close to home. This is not a general-purpose Go framework like net/http with extra helpers; it is a deliberate re-implementation of Express semantics on a different HTTP stack. That matters because the underlying engine changes what you can assume about request handling.
How it works: Fasthttp underneath, Express on top
The core mechanism is that Fiber does not use Go's standard net/http package. It uses Fasthttp, which reuses objects across requests to reduce allocations. The README is blunt about the consequence: values returned from fiber.Ctx are not immutable by default and will be reused across requests. Inside a handler you can read params, query strings, and body data, but you must not keep a reference to any of that data after the handler returns. The routing model mirrors Express: you define methods like Get and Post on the app, pass a path and a handler, and the handler returns an error. Middleware support is present via the Next function, and the feature list includes static file serving, WebSocket support through a contrib package, server-sent events, and a rate limiter. The data flow is straightforward: a request comes into Fasthttp, Fiber maps it to a route, the handler runs, and the response is written. The zero-allocation claim is not a marketing line; it is a contract you must honor in your own code.
Getting it running: commands and the Go 1.25 gate
Installation follows the standard Go module path. The README instructs you to initialize a module with go mod init github.com/your/repo, then run go get -u github.com/gofiber/fiber/v3. The quickstart example is a complete server: fiber.New() creates the app, app.Get("/", handler) registers a route, and app.Listen(":3000") starts it. The one hard requirement is Go version 1.26 or higher. That is a recent release, and it will exclude teams on older toolchains. The example uses the v3 import path, which is the current major version. If you are on v2, the import path differs, and the README has a Migrate section: install the Fiber CLI and run fiber migrate --to v3. The setup cost is low if you already have Go 1.26; the framework handles the HTTP server lifecycle, so you do not need to wire up a separate server object.
The zero-allocation rule: a real footgun, not a feature
The README states that context values are reused across requests and that you must only use them within the handler. That is a sharp constraint. In a typical Go web app, you often want to extract a user ID from a path parameter, store it in a struct, and use it later in a goroutine or a background job. Fiber forbids that pattern by default. If you keep a reference to c.Params("id") or c.Body() and use it after the handler returns, you will read data from a later request. The documentation page linked in the README covers this, but the README itself is clear enough. This is not a bug; it is the price of zero-allocation performance. For teams that are new to Go, this rule is easy to violate. The framework does not stop you at compile time; it produces subtle race-like bugs at runtime. If your application needs to pass request data to asynchronous tasks, you must copy the values explicitly before the handler returns. That is extra code and a discipline requirement that Express developers will not have.
Performance claims: what the README does and does not prove
The README links to TechEmpower benchmarks and to the project's own benchmark page. It says Fiber is built on Fasthttp, which it calls the fastest HTTP engine for Go, and that Fiber is optimized for high performance and low memory. The README text itself gives no requests-per-second figure; it points to TechEmpower results and the project's benchmark pages. What is clear is that the design choices, like zero allocation and object reuse, are consistent with a performance-oriented framework. You should treat the performance claim as plausible but unverified. If you are choosing a framework purely on benchmark numbers, you will need to run your own tests against your workload. The zero-allocation rule is the strongest evidence that the project takes performance seriously, because it sacrifices ergonomics for speed.
Where Fiber is the wrong tool
Fiber is not a drop-in replacement for net/http. Because it sits on Fasthttp, any middleware or library that expects http.Request or http.ResponseWriter will not work directly. The README lists WebSocket and Socket.io support through contrib packages, but it does not claim compatibility with the broader Go ecosystem. If your project depends on a net/http middleware like a specific auth library or a metrics exporter, you will need to adapt it or find a Fiber-specific version. The Go 1.26 requirement is another boundary: if your production environment is pinned to an older Go version, you cannot use v3. Also, the Express-inspired API is a double-edged sword. It lowers the barrier for Node.js developers, but it may hide Go idioms. For example, the error handling pattern, returning an error from a handler, is familiar to Express users but differs from how net/http handlers work. Teams that already know Go well might prefer a framework that follows net/http conventions more closely.
Alternatives: net/http and Gin take different paths
The most direct alternative is Go's standard net/http package. It does not use Fasthttp, so it has a different performance profile, but it gives you compatibility with the entire Go ecosystem. With net/http, you write your own routing or use a third-party router, and you do not get the Express-like handler signature. Another common alternative is Gin, which is a popular Go web framework. Gin uses net/http underneath, so it works with standard middleware and libraries. Gin's API is also handler-based. The key difference is the underlying engine: Fiber commits to Fasthttp for speed, while Gin stays on net/http for compatibility. If you value ecosystem compatibility over raw speed, Gin or plain net/http is the safer choice. If you want the Fasthttp performance and you can live with the constraints, Fiber is the only one of these that gives you that stack directly.
Maintenance and upgrade cost
The repository shows active maintenance: the last push is from 2026-11-02, and there are recent releases for both v3.6.1 and v2.52.16. That dual-track release pattern means the project supports two major versions at once. The README has a Migrate section: the Fiber CLI can migrate a project with fiber migrate --to v3, and it links a migration guide for what changed in v3. The license is MIT, which is permissive and does not impose restrictions on commercial use, but this is not legal advice. The maintenance cost is moderate: the framework is actively updated, which means you should budget time for dependency upgrades. The zero-allocation rule also adds a long-term maintenance burden because every handler you write must be reviewed for context reference leaks. That is a code review cost that does not exist with net/http-based frameworks.
Editorial conclusion
Adopt Fiber if you want an Express-like API in Go with Fasthttp's performance profile and you can live with the zero-allocation rule: never keep references to context values beyond a handler. Do not adopt it if you are on a Go version below 1.26, if you require the full net/http middleware ecosystem, or if you cannot train your team to avoid storing c.Values. Before committing, verify that your existing Go middleware and libraries work with Fasthttp's request and response types, and test the v3 API against your routes, since v3 is a major version with breaking changes from v2.
Frequently asked questions
What is Fiber in Go?
Fiber is an Express inspired web framework written in Go and built on top of Fasthttp, which it calls the fastest HTTP engine for Go. It requires Go version 1.26 or higher, installs with go get -u github.com/gofiber/fiber/v3, and its quickstart creates an app with fiber.New, registers a route on the root path, and starts the server with app.Listen on port 3000.
What does zero allocation mean in Fiber, and what is the catch?
It means values returned from fiber.Ctx are not immutable by default and will be reused across requests. The project states that you must only use context values within the handler and must not keep any references, because once you return from the handler, any values obtained from the context will be reused in future requests.
Which Fiber version is current, and what changed in v3?
The v3 line is current, with v3.6.1 released on 2026-10-14, and the install path is github.com/gofiber/fiber/v3. The quickstart handler takes a fiber.Ctx, and the repository holds ctx_interface.go, a generated ctx_interface_gen.go, and a ctx_reclaim_test.go. The v2 line is still receiving patches, with v2.52.16 on 2026-10-23.
How do you run the Fiber test suite and linters?
Through the Makefile. make test runs the suite with the race detector, a count of 1 and shuffling on, and make longtest repeats that run fifteen times. make lint runs golangci-lint pinned at v2.14.0, make audit runs go mod verify, go vet, and govulncheck, and make coverage writes a profile to /tmp/coverage.out before opening it with go tool cover.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/gofiber-fiber)Star history chart for your README
[](https://hysenlabs.com/projects/gofiber-fiber)Was this useful?