An 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. Designed to ease things up for fast development with zero memory allocation and performance in mind.

Installation

go get -u github.com/gofiber/fiber

Example

package main

import "github.com/gofiber/fiber"

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

app.Listen(3000)
}

Benchmarks Fiber vs Express

  • Plaintext

Fiber handled 6,162,556 responses per second with an average latency of 2.0 ms.

Express handled 367,069 responses per second with an average latency of 354.1 ms.

  • Data Updates

Fiber handled 11,846 responses per second with an average latency of 42.8 ms.

Express handled 2,066 responses per second with an average latency of 390.44 ms.

  • Multiple Queries

Fiber handled 19,664 responses per second with an average latency of 25.7 ms.

Express handled 4,302 responses per second with an average latency of 117.2 ms.

  • Single Query

Fiber handled 368,647 responses per second with an average latency of 0.7 ms.

Express handled 57,880 responses per second with an average latency of 4.4 ms.

  • JSON Serialization

Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms.

Express handled 244,847 responses per second with an average latency of 1.1 ms.

Full-stack developer and Open Source contributor — https://github.com/null-none · https://www.linkedin.com/in/kal1sha/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store