Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Fastify | 26,760 | 1,131 | 1,764 | 16 hours ago | 235 | September 14, 2022 | 75 | other | JavaScript | |
Fast and low overhead web framework, for Node.js | ||||||||||
Echo | 25,207 | 1,606 | 3 days ago | 165 | September 04, 2022 | 63 | mit | Go | ||
High performance, minimalist Go web framework | ||||||||||
Buffalo | 7,504 | 149 | 82 | 21 days ago | 172 | August 25, 2022 | 23 | mit | Go | |
Rapid Web Development w/ Go | ||||||||||
Go Web Framework Benchmark | 1,836 | 14 days ago | 1 | February 14, 2021 | 18 | apache-2.0 | Go | |||
:zap: Go web framework benchmark | ||||||||||
Sauron | 1,749 | 2 | 8 | 3 days ago | 89 | September 21, 2022 | 5 | mit | Rust | |
A versatile web framework and library for building client-side and server-side web applications | ||||||||||
Py Frameworks Bench | 663 | 5 months ago | 14 | mit | Python | |||||
Another benchmark for some python frameworks | ||||||||||
Cottage | 100 | 4 | 2 | 3 years ago | 13 | October 29, 2019 | 4 | JavaScript | ||
Simple, fast HTTP router on koa.js. | ||||||||||
Webpp | 72 | 2 days ago | 170 | mit | C++ | |||||
C++ web framework | web development can be done with C++ as well. | ||||||||||
Procyon | 57 | 3 | 2 months ago | 11 | June 17, 2021 | 1 | apache-2.0 | Go | ||
Procyon is a powerful http web framework written in Go. "Build your application fast". | ||||||||||
Zap | 53 | 5 years ago | 4 | November 13, 2017 | 1 | mit | Rust | |||
:zap: fast http framework for rust |
This benchmark suite aims to compare the performance of Go web frameworks. It is inspired by Go HTTP Router Benchmark but this benchmark suite is different with that. Go HTTP Router Benchmark suit aims to compare the performance of routers but this Benchmark suit aims to compare whole HTTP request processing.
Last Test Updated: 2020-05
test environment
Only test those webframeworks which are stable
some libs have not been maintained and the test code has removed them
When I investigated performance of Go web frameworks, I found Go HTTP Router Benchmark, created by Julien Schmidt. He also developed a high performance http router: httprouter. I had thought I got the performance result until I created a piece of codes to mock the real business logics:
api.Get("/rest/hello", func(c *XXXXX.Context) {
sleepTime := strconv.Atoi(os.Args[1]) //10ms
if sleepTime > 0 {
time.Sleep(time.Duration(sleepTime) * time.Millisecond)
}
c.Text("Hello world")
})
When I use the above codes to test those web frameworks, the token time of route selection is not so important in the whole http request processing, although performance of route selection of web frameworks are very different.
So I create this project to compare performance of web frameworks including connection, route selection, handler processing. It mocks business logics and can set a special processing time.
The you can get some interesting results if you use it to test.
When you test a web framework, this test suit will starts a simple http server implemented by this web framework. It is a real http server and only contains GET url: "/hello".
When this server processes this url, it will sleep n milliseconds in this handler. It mocks the business logics such as:
It contains a test.sh that can do those tests automatically.
It uses wrk to test.
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:
In 30 ms processing time, the test result for 100, 1000, 5000 clients is:
If we enable http pipelining, test result as below:
You should install this package first if you want to run this test.
go get github.com/smallnest/go-web-framework-benchmark
It takes a while to install a large number of dependencies that need to be downloaded. Once that command completes, you can run:
cd $GOPATH/src/github.com/smallnest/go-web-framework-benchmark
go build -o gowebbenchmark *.go
./test.sh
It will generate test results in processtime.csv and concurrency.csv. You can modify test.sh to execute your customized test cases.
./test-latency.sh
./test-latency-nonkeepalive.sh
./test-pipelining.sh
……
web_frameworks=( "default" "ace" "beego" "bone" "denco" "echov1" "echov2standard" "echov2fasthttp" "fasthttp-raw" "fasthttprouter" "fasthttp-routing" "gin" "gocraftWeb" "goji" "gojiv2" "gojsonrest" "gorestful" "gorilla" "httprouter" "httptreemux" "lars" "lion" "macaron" "martini" "pat" "r2router" "tango" "tiger" "traffic" "violetear" "vulcan")
……
./test-all.sh
you can run the shell script plot.sh
in testresults directory and it can generate all images in its parent directory.
Welcome to add new Go web frameworks. You can follow the below steps and send me a pull request.
Please add your web framework alphabetically.