description
This benchmarks aims to compare the performance of Fiber and other web frameworks.

🤖 Benchmarks

TechEmpower

🔗 https://www.techempower.com/benchmarks/

  • CPU Intel Xeon Gold 5120
  • MEM 32GB
  • GO go1.13.6 linux/amd64
  • OS Linux
  • NET Dedicated Cisco 10-gigabit Ethernet switch.

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.

🤖 Benchmarks - 图1

Fiber vs Express

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.

🤖 Benchmarks - 图3

Fiber vs Express

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.

🤖 Benchmarks - 图5

Fiber vs Express

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.

🤖 Benchmarks - 图7

Fiber vs Express

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.

🤖 Benchmarks - 图9

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

🤖 Benchmarks - 图11

The concurrency clients are 5000.

🤖 Benchmarks - 图12

Latency is the time of real processing time by web servers. The smaller is the better.

🤖 Benchmarks - 图13

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

🤖 Benchmarks - 图14

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

🤖 Benchmarks - 图15

🤖 Benchmarks - 图16

🤖 Benchmarks - 图17

If we enable http pipelining, test result as below:

🤖 Benchmarks - 图18

Dependency graph for v1.9.0

🤖 Benchmarks - 图19