Skip to main content
Version: v2.x

📊 Benchmarks

TechEmpower

TechEmpower provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition.

Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the GitHub repository.

  • Fiber v1.10.0
  • 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz
  • 32GB RAM
  • Ubuntu 18.04.3 4.15.0-88-generic
  • Dedicated Cisco 10-Gbit Ethernet switch.

Plaintext

The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment.

See Plaintext requirements

Fiber - 6,162,556 responses per second with an average latency of 2.0 ms.
Express - 367,069 responses per second with an average latency of 354.1 ms.

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.

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.

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.

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.

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.

The concurrency clients are 5000.

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

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:

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

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0