mrkeyoor.com_
Wed 09 Sept 06:48 UTC
Webevaluationupdated 09 Sept 2026

fasthttp review

fasthttp is a Go HTTP client and server library built for workloads where request handling and memory allocations are proven bottlenecks. It replaces the standard `net/http` programming model with reusable request objects and byte-oriented APIs, which saves work at the cost of compatibility and easier defaults.

Verdict

Our fasthttp run installed 12 packages and passed 22 of 22 tests, with install, build, and tests finishing in 80 seconds total. Use it when production profiling has already shown that net/http allocation or request overhead is costing you, and your team can own the different lifecycle rules. Start with the standard library for ordinary services, especially when native HTTP/2 and middleware compatibility matter.

We ran it

Lab card: what happened when we ran fasthttpScreenshot of fasthttp (github.com/valyala/fasthttp)
Install✓ · 30s12 packages
Build✓ · 32s
Tests✓ · 18s22 passed · 0 failed of 22 (go test)
Repo184 files~59,770 lines of source · 1.7 MB · 3 CI workflows

Answers from our run

Does fasthttp build from source?

Dependencies installed in 30 seconds (12 packages), and the build succeeded in 32 seconds. We cloned commit 8bb4f7a into a clean Debian container with 3 CPUs and no project-specific setup.

Do fasthttp's tests pass?

Yes: 22 of 22 passed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use fasthttp?

Most Go web services: the README itself says net/http is easier, handles more cases, and is the better choice unless the performance difference is measurable.

What are the alternatives to fasthttp?

Go net/http, Gin, Fiber. Our fasthttp run installed 12 packages and passed 22 of 22 tests, with install, build, and tests finishing in 80 seconds total.

Setup4/5All steps passed in 80 seconds; correct use needs API discipline
Docs5/5README covers migration, limits, pooling, streaming, and tradeoffs
Community4/523,469 stars with releases and code activity in September 2026
Maturity4/5Version 1.74.0 is active; HTTP/2 and API stability remain caveats

Who it’s for

Go teams that have profiled a high-throughput HTTP service and found the standard stack is the limiting factor.
Developers prepared to manage pooled objects, byte slices, body limits, and request lifetimes carefully.
Services that mainly exchange small or medium HTTP/1 requests and can use a fasthttp-specific router or handler.
Framework authors who want a low-allocation HTTP engine and can absorb its API choices for their users.

Who it’s NOT for

Most Go web services: the README itself says net/http is easier, handles more cases, and is the better choice unless the performance difference is measurable.
Projects that require native HTTP/2 in the released package: the README describes support as in progress, and pull request 2347 remained open with a needschange label.
Codebases that need drop-in net/http middleware and handlers: fasthttp has a different handler API, no ServeMux, and recommends hand-written conversion for full benefit.
Handlers that expect standard request cancellation or default body streaming: RequestCtx.Done() closes only during server shutdown, and bodies are buffered unless streaming is enabled.

Setup reality

Our Go 1.24 sandbox installed 12 packages in 30 seconds. The build succeeded in 32 seconds, and go test completed in 18 seconds with 22 passed and 0 failed out of 22.

fasthttp is a library, so it needs no account, daemon, or secret by itself. Your application still owns the listener, TLS certificates, router, timeouts, proxy behavior, and limits for untrusted request or response bodies.

The current README supports Go 1.25.x and newer, even though measured commit 8bb4f7a built on Go 1.24. The 1.7 MB checkout contained 184 files and about 59,770 source lines, with 3 CI workflows, no Dockerfile, and no tests directory. Its pooled objects and byte slices also require stricter lifetime rules than net/http.

Fasthttp belongs in services with a measured HTTP bottleneck

The project's own README gives unusually blunt buying advice: most Go programs should use net/http. fasthttp is aimed at edge cases where a server or client handles a sustained stream of small or medium requests and needs low, consistent latency. That warning matters more than the benchmark tables. A faster parser cannot justify a second HTTP programming model when databases, remote APIs, locks, or application code dominate response time. Profile the real service before changing its foundation.

The repository is compact enough for that evaluation. We checked out commit 8bb4f7a and measured 184 files, about 59,770 lines of source, and 1.7 MB on disk. It is a library rather than a ready server, so a successful build does not produce an application with routes or TLS policy. Your code supplies the listener, handler, limits, logging, shutdown behavior, and every feature above HTTP processing. That narrow scope is useful when the engine itself is the problem.

The API exchanges net/http compatibility for object reuse

A fasthttp server receives a RequestCtx in a function instead of passing http.ResponseWriter and *http.Request through the standard handler interface. There is an adaptor, but the README recommends rewriting handlers to receive the intended performance benefit. fasthttp also omits ServeMux; users choose a third-party router, a framework such as Fiber, or their own dispatch. Existing net/http middleware therefore needs replacement, wrapping, or a deliberate boundary between the two stacks.

That design encourages reuse. Request and response values can be acquired, reset, and returned to pools, while hot paths favor []byte over strings to avoid conversions. Our dependency step installed 12 packages in 30 seconds, which keeps the imported surface modest. The coding burden moves into the application: references to a context or its members must not survive the handler, and byte slices returned by the API may point at memory that will be reused on the next request.

What happened when we ran it

Our sandbox installed fasthttp in 30 seconds and built it in 32 seconds. We used an unprivileged Debian container with Go 1.24, 3 CPUs, 8 GB of RAM, and no secrets. Both steps succeeded. The source checkout itself occupied 1.7 MB before installation, and the dependency resolver added 12 packages. No database, network service, credential, Docker daemon, or generated configuration was needed to compile commit 8bb4f7a.

The test command finished in 18 seconds with 22 passed and 0 failed out of 22. Those results establish that the available Go tests selected by our harness passed on the measured commit. They do not measure requests per second, tail latency, allocation counts, HTTP conformance, or behavior behind a particular proxy. Our scan found 3 CI workflow files, no Dockerfile, and no tests directory. None of those signals changes the clean build and test result.

Native HTTP/2 has not reached a release

The README says fasthttp does not natively support HTTP/2 and points to separate work in progress. Pull request 2347 proposes native server and client support, but it was still open on September 5, 2026 with a needschange label. That makes protocol support a present-tense architecture constraint, not a feature to assume from active development. Teams needing HTTP/2 between their proxy and application should choose net/http or validate a separate add-on instead of building around an unmerged branch.

The protocol gap is easy to miss because version 1.74.0 arrived on September 7, 2026 with a long list of HTTP correctness and lifecycle fixes. The release addressed out-of-range content lengths, informational responses, streaming resource release, a pooled-timer panic, connection cleanup, request timeouts, and URI handling. Those changes show active maintenance. They also show why an HTTP engine needs careful upgrade tests even when its measured checkout has only 184 files and 3 CI workflows.

Request lifetimes and body limits require explicit code

RequestCtx.Done() behaves differently from the standard request context: the README says its channel closes when the server shuts down, not when an individual client request is canceled. Handlers that launch goroutines or retain context-backed values can create races as pooled state is reused. The project tells users to run the race detector regularly and to call the documented timeout method before another goroutine accesses context data after the handler returns. This discipline is part of adopting fasthttp.

Bodies need similar care. net/http streams request and response bodies by default, while fasthttp buffers them unless streaming is enabled. The best-practices section tells clients of untrusted servers to set a positive maximum response body size; a non-positive limit can allow a buffered response to consume unbounded memory. The README also exposes unsafe zero-copy string and byte conversions, with a warning against mutation. A 12-package install does not make these ownership rules automatic.

September 2026 activity is current, with 90 issues and PRs open

GitHub recorded 23,469 stars, 90 open issues and pull requests combined, and a last push on September 9, 2026. The latest release was two days earlier, and new pull requests followed it. One current report, issue 2385, describes header-parameter parsing stopping at an empty element and hiding parameters that follow; a proposed fix was opened the next day. The combined queue is not a defect count, but this sequence shows both live scrutiny and the protocol edge cases maintainers handle.

fasthttp can be a sound choice after measurement, especially for a narrow HTTP/1 service whose team is comfortable with pools and byte slices. Our 80-second install, build, and test path makes a proof of concept cheap. The expensive part is application migration and long-term care around cancellation, streaming, body limits, routers, and protocol support. If profiling does not put HTTP overhead near the top, net/http is the more defensible engineering choice.

Alternatives

ProjectWhat it isPick it when
Go net/http gh↗The Go standard library HTTP stack with broad protocol support and ecosystem compatibility.pick this instead when profiling has not proved an HTTP bottleneck, or standard handlers and HTTP/2 matter more than lower allocation pressure.
GinA web framework built around Go's standard HTTP interfaces with routing and middleware included.pick this instead when application structure and familiar middleware matter more than controlling the HTTP engine directly.
FiberAn Express-style Go web framework that uses fasthttp underneath.pick this instead when you want fasthttp's engine with a higher-level router and application API.

What people are saying

  1. [velocity-scout] valyala/fasthttp

Sources

  1. fasthttp repository and README
  2. fasthttp 1.74.0 release notes
  3. Native HTTP/2 support pull request
  4. Header parameter parsing issue
  5. fasthttp Go package documentation

More web reviews

BongoCat · react-hook-form · pretext · solid · quasar · filament · the whole board →