docs/comparison/gofr-vs-fiber/page.md
{% answer %}
Fiber is an Express-inspired HTTP framework built on fasthttp — a great choice when you want a familiar API for Node.js refugees and high HTTP throughput. GoFr sits on net/http and has a wider scope: alongside HTTP routing it bundles OpenTelemetry tracing, Prometheus metrics, datasource clients, gRPC, GraphQL, WebSockets, Pub/Sub, cron, migrations, and circuit breakers. Different trade-offs, both open source — pick whichever fits the work in front of you.
{% /answer %}
fasthttp, regularly outperforms net/http-based frameworks on synthetic benchmarks.Fiber's foundation is fasthttp, which is not compatible with net/http. Some Go libraries assume http.ResponseWriter/http.Request and won't drop into a Fiber handler without an adapter. GoFr is built on net/http, so the standard library and any net/http-compatible middleware works.
Fiber focuses on HTTP. For other protocols, you'd add separate libraries (which works well — the Go ecosystem has good options for each). GoFr bundles those protocols under the same configuration and observability:
app.RegisterService(serviceDesc, impl) // gRPC service
app.GraphQLQuery("user", userResolver)
app.Subscribe("orders", orderHandler)
app.AddCronJob("0 * * * *", "billing", run) // every hour at :00
Fiber middleware exists for OpenTelemetry and Prometheus, but you wire them in. In GoFr, traces / metrics / structured logs are emitted by default with no setup beyond pointing at your collectors via env vars. GoFr ships clients for MySQL, PostgreSQL, Mongo, Redis, Cassandra, ClickHouse, Kafka, NATS, S3, GCS, and a dozen more — all auto-instrumented.
Already on Fiber? See the Migrate from Fiber guide for concrete code translations.
{% faq %}
{% faq-item question="Can Fiber use net/http middleware?" %}
With an adapter, yes — Fiber provides adaptor.HTTPHandler to wrap net/http middleware. There's a small overhead per call. GoFr uses net/http natively, so no adapter is needed.
{% /faq-item %}
{% faq-item question="Does GoFr have a fasthttp-based mode?" %}
No. GoFr is built on net/http and prioritizes ecosystem compatibility.
{% /faq-item %}
{% /faq %}